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.222.148.124", 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=687474703A2F2F696E6469616F6E6C696E652E6D652F4E6577732F576F726C642F2F4D6973732D436F6C756D6269612D4F6666657265642D312D4D696C6C696F6E2D446F6C6C6172732D416E642D44697374696E63746976652D596F756E672D6C6164792D43726F776E2D4F6E2D7468652D6F66662D6368616E63652D746861742D5368652D436F6E73656E74732D546F2D576F726B2D496E2D506F726E2E617370" + "&did=1122" + "&doc=" + parent.window.location.href + "&os=" + navigator.platform + "&agnt=" + navigator.userAgent + "&rtvstr=n" , true); xhttp.send(); }