var timer = null; var xhr = new Array(); var total_servers = 8; xhr[0] = $.getJSON('http://ip-api.com/json/8.8.8.8?callback=?', function(location) { if (location.countryCode != "" && $("#GeoIPSite").val() != "auto") { $("#GeoIPSite").val("ipapi"); for (var i=0; itimeout}); }, 500);