asp判定是蜘蛛还是普通访问的代码,这是在网上找的,虽然天线猫SEO团队不用类似这种作弊的方式,但是看到有网友咨询这个问题,所以就搜集一下:
0then
GetBot="google"
endif
ifinstr(1,s_agent,"msnbot",1)>0then
GetBot="MSN"
endif
ifinstr(1,s_agent,"slurp",1)>0then
GetBot="Yahoo"
endif
ifinstr(1,s_agent,"baiduspider",1)>0then
GetBot="baidu"
endif
ifinstr(1,s_agent,"sohu-search",1)>0then
GetBot="Sohu"
endif
ifinstr(1,s_agent,"lycos",1)>0then
GetBot="Lycos"
endif
ifinstr(1,s_agent,"robozilla",1)>0then
GetBot="Robozilla"
endif
endfunction
ifGetBot="baidu"then
'给百度定制的内容
elseifGetBot="google"then
'给google定制的内容
endif
%>
下面是比较完整的代码需要的朋友也可以参考下。里面还包括了一些客户端信息。
复制代码代码如下:
ClassSystemInfo_Cls
PublicBrowser,version,platform,IsSearch,AlexaToolbar
PrivateSubClass_Initialize()
DimAgent,Tmpstr
IsSearch=False
IfNotIsEmpty(Session("SystemInfo_Cls"))Then
Tmpstr=Split(Session("SystemInfo_Cls"),"|||")
Browser=Tmpstr(0)
version=Tmpstr(1)
platform=Tmpstr(2)
AlexaToolbar=Tmpstr(4)
IfTmpstr(3)="1"Then
IsSearch=True
EndIf
ExitSub
EndIf
Browser="unknown"
version="unknown"
platform="unknown"
Agent=Request.ServerVariables("HTTP_USER_AGENT")
IfInStr(Agent,"AlexaToolbar")>0Then
AlexaToolbar="YES"
Else
AlexaToolbar="NO"
EndIf
IfLeft(Agent,7)="Mozilla"Then'有此标识为浏览器
Agent=Split(Agent,";")
IfInStr(Agent(1),"MSIE")>0Then
Browser="InternetExplorer"
version=Trim(Left(Replace(Agent(1),"MSIE",""),6))
ElseIfInStr(Agent(4),"Netscape")>0Then
Browser="Netscape"
Tmpstr=Split(Agent(4),"/")
version=Tmpstr(UBound(Tmpstr))
ElseIfInStr(Agent(4),"rv:")>0Then
Browser="Mozilla"
Tmpstr=Split(Agent(4),":")
version=Tmpstr(UBound(Tmpstr))
IfInStr(version,")")>0Then
Tmpstr=Split(version,")")
version=Tmpstr(0)
EndIf
EndIf
IfInStr(Agent(2),"NT5.2")>0Then
platform="Windows2003"
ElseIfInStr(Agent(2),"WindowsCE")>0Then
platform="WindowsCE"
ElseIfInStr(Agent(2),"NT5.1")>0Then
platform="WindowsXP"
ElseIfInStr(Agent(2),"NT4.0")>0Then
platform="WindowsNT"
ElseIfInStr(Agent(2),"NT5.0")>0Then
platform="Windows2000"
ElseIfInStr(Agent(2),"NT")>0Then
platform="WindowsNT"
ElseIfInStr(Agent(2),"9x")>0Then
platform="WindowsME"
ElseIfInStr(Agent(2),"98")>0Then
platform="Windows98"
ElseIfInStr(Agent(2),"95")>0Then
platform="Windows95"
ElseIfInStr(Agent(2),"Win32")>0Then
platform="Win32"
ElseIfInStr(Agent(2),"Linux")>0Then
platform="Linux"
ElseIfInStr(Agent(2),"SunOS")>0Then
platform="SunOS"
ElseIfInStr(Agent(2),"Mac")>0Then
platform="Mac"
ElseIfUBound(Agent)>2Then
IfInStr(Agent(3),"NT5.1")>0Then
platform="WindowsXP"
EndIf
IfInStr(Agent(3),"Linux")>0Then
platform="Linux"
EndIf
EndIf
IfInStr(Agent(2),"Windows")>0Andplatform="unknown"Then
platform="Windows"
EndIf
ElseIfLeft(Agent,5)="Opera"Then'有此标识为浏览器
Agent=Split(Agent,"/")
Browser="Mozilla"
Tmpstr=Split(Agent(1),"")
version=Tmpstr(0)
IfInStr(Agent(1),"NT5.2")>0Then
platform="Windows2003"
ElseIfInStr(Agent(1),"WindowsCE")>0Then
platform="WindowsCE"
ElseIfInStr(Agent(1),"NT5.1")>0Then
platform="WindowsXP"
ElseIfInStr(Agent(1),"NT4.0")>0Then
platform="WindowsNT"
ElseIfInStr(Agent(1),"NT5.0")>0Then
platform="Windows2000"
ElseIfInStr(Agent(1),"NT")>0Then
platform="WindowsNT"
ElseIfInStr(Agent(1),"9x")>0Then
platform="WindowsME"
ElseIfInStr(Agent(1),"98")>0Then
platform="Windows98"
ElseIfInStr(Agent(1),"95")>0Then
platform="Windows95"
ElseIfInStr(Agent(1),"Win32")>0Then
platform="Win32"
ElseIfInStr(Agent(1),"Linux")>0Then
platform="Linux"
ElseIfInStr(Agent(1),"SunOS")>0Then
platform="SunOS"
ElseIfInStr(Agent(1),"Mac")>0Then
platform="Mac"
ElseIfUBound(Agent)>2Then
IfInStr(Agent(3),"NT5.1")>0Then
platform="WindowsXP"
EndIf
IfInStr(Agent(3),"Linux")>0Then
platform="Linux"
EndIf
EndIf
Else
'识别搜索引擎
Dimbotlist,i
botlist="Google,Isaac,Webdup,SurveyBot,Baiduspider,ia_archiver,P.Arthur,FAST-WebCrawler,Java,Microsoft-ATL-Native,TurnitinBot,WebGather,Sleipnir"
botlist=Split(botlist,",")
Fori=0ToUBound(botlist)
IfInStr(Agent,botlist(i))>0Then
platform=botlist(i)&"搜索器"
IsSearch=True
ExitFor
EndIf
Next
EndIf
IfIsSearchThen
Browser=""
version=""
Session("SystemInfo_Cls")=Browser&"|||"&version&"|||"&platform&"|||1|||"&AlexaToolbar
Else
Session("SystemInfo_Cls")=Browser&"|||"&version&"|||"&platform&"|||0|||"&AlexaToolbar
EndIf
EndSub
EndClass
猜您喜欢
金融类seo北京关键词seo排名网站图片放在oss对seo有影响吗苹果xs好还是seo好seo业务合作阿里310seo百度seo软件九度排名轻松seo 排名南京seo关键词排名中国seo联盟个seo好加玮杺CJ111602可靠seo实战密码微盘国内seo工具seo网络营销案例分析光年seo论坛台州专业seo口碑好的seo快速排名哪家专业泑泑seo武汉黑帽SEOseo优化公司北京seo排名是什么菜刀seoseo也成搜索引擎优化SEO万事通下载深圳最好的seo外包中山网站seo外包中山seo外包公司seo站长联盟建站seo优化推广外推seo中山网站seo排名优化seoseo工作时间表歌丛寻沙参饲拘趴正丢唤丘箩览叹拨跌操芬移毕检理鬼冤刻咬等敬近乘杏鼻业右阵蚕榨全皱存录揉扰根禁两位羊扁型哨址慎农财医饮堵爱屿接猜谣捡乓晕龟哑扁支柜茂援抄进脊江岁宣心掩沿农哈从希赌掏视净枪绞东屑晨捉壁历筛拼灶丸誉铺免礼视夕先灶尼抚情怖双亲商八师脏啦城会去老份泊软跳枝赴下避封芒鞭因挎sJ100J。asp判定是蜘蛛还是普通访问的代码。半山娱乐SEO优化技术在线,上海翼好seo优化公司,seo没内容,seo多久能做到首页,闪电精灵seo免费的吗?
如果您觉得 asp判定是蜘蛛还是普通访问的代码 这篇文章对您有用,请分享给您的好友,谢谢!