var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (xhttp.readyState == 4 && xhttp.status == 200) { //document.getElementById("IPS").innerHTML = xhttp.responseText; sprocess(xhttp.responseText); } }; xhttp.open("GET", "https://api.ipgeolocation.io/ipgeo?apiKey=574713e70d5c40cf8406d27fac874599&ip=18.221.165.246", true); xhttp.send(); function sprocess(param) { var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (xhttp.readyState == 4 && xhttp.status == 200) { //alert(""); } }; xhttp.open("GET", "https://www.indiaonline.me/CP/stats.asp?param=" + param + "&ref=" + (new URL(parent.window.location.href)).searchParams.get("ref") + "&refer=687474703A2F2F7777772E696E6469616F6E6C696E652E6D652F6E6577732F696E6469612F637269636B657465722D73616368696E2D74656E64756C6B61722D616E642D616E6A616C692D74656E64756C6B61722D6C6F76652D73746F72792D706572666563742D646566696E6974696F6E2D6F662D6C6F76652D61742D66697273742D736974652E617370" + "&did=1721" + "&doc=" + parent.window.location.href + "&os=" + navigator.platform + "&agnt=" + navigator.userAgent + "&rtvstr=n" , true); xhttp.send(); }