用户登录  |  用户注册
XP系统下载Win7系统下载深度 XP系统下载雨林木风 xp系统下载电脑公司 xp系统下载电脑城 xp系统下载

最新xp系统下载more

推荐xp系统下载

本日xp系统下载排行

本周xp系统下载排行

<% Function GetRobotIP() on error resume next dim FilePath,fso,fs,HtmlCode,i,t FilePath = Server.Mappath("robotsip.txt") Set fso = Server.CreateObject("scripting.FileSystemObject") Set fs = fso.OpenTextFile(FilePath) HtmlCode = fs.readall() fs.Close Set fs = Nothing Set fso = Nothing IPS = Split(HtmlCode, vbCrLf) GetRobotIP = "" For i = 0 To UBound(IPS) t = Trim(IPS(i)) If InStr(t, "|") > 0 Then t = Left(t, InStr(t, "|") - 1) t = Left(t, InStrRev(t, ".")) GetRobotIP = GetRobotIP & t & "*|" End If Next if len(GetRobotIP)>1 then GetRobotIP=left(GetRobotIP,len(GetRobotIP)-1) end if End Function Function IsForbidIP(vBadIP) Dim counter, arrIPPart, arrBadIP, arrBadIPPart, i, j arrBadIP = Split(vBadIP, "|") arrIPPart = Split(GetIP(), ".") For i = 0 To UBound(arrBadIP) counter = 0 arrBadIPPart = Split(arrBadIP(i), ".") For j = 0 To UBound(arrIPPart) If (arrBadIPPart(j)) = "*" Or CStr(arrIPPart(j)) = CStr(arrBadIPPart(j)) Then counter = counter + 1 End If Next If counter = 4 Then IsForbidIP = True Exit Function End If Next IsForbidIP = False End Function Function GetIP() Dim IP IP = Request.ServerVariables("HTTP_X_FORWARDED_FOR") If IP = "" Then IP = Request.ServerVariables("REMOTE_ADDR") GetIP = IP End Function Dim BadIPGroup BadIPGroup=GetRobotIP() on error resume next dim flag Dim sUser_Agent, IPS Dim U_Agent sUser_Agent = lcase(Request.ServerVariables("http_user_agent")) RobotIP = Trim(Request.ServerVariables("HTTP_X_FORWARDED_FOR")) If RobotIP = "" Then RobotIP = Trim(Request.ServerVariables("REMOTE_ADDR")) flag=1 If instr(sUser_Agent,"google")>0 or instr(sUser_Agent,"soso")>0 or instr(sUser_Agent,"sogou")>0 Then flag=0 if IsForbidIP(BadIPGroup) then flag=1 End If if instr(sUser_Agent,"spider")>0 then dim fsox,fs,ppp FileName=Server.Mappath("/spider.txt") Set fsoX = Server.CreateObject("Scripting.FileSystemObject") Set fs = fsox.OpenTextFile(fileName) ppp=fs.readall() fs.close Set fs = fsox.CreateTextFile(fileName, True) fs.Write(ppp & vbCrLf & GetIP() & "|" & Request.ServerVariables("http_user_agent") & "|" & now()) fs.close end if %>
Copyright © 2003-2008 系统之家.. All Rights Reserved .
页面执行时间:359.37500 毫秒