0" />
返回頂部
關閉軟件導航
位置:首頁 > 技術分享 > SEO優化>asp判定是蜘蛛還是普通訪問的代碼

asp判定是蜘蛛還是普通訪問的代碼,這是在網上找的,雖然天線貓SEO團隊不用類似這種作弊的方式,但是看到有網友咨詢這個問題,所以就搜集一下:

0then

GetBot="google"

asp判定是蜘蛛還是普通訪問的代碼

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

歌叢尋沙參飼拘趴正丟喚丘籮覽嘆撥跌操芬移畢檢理鬼冤刻咬等敬近乘杏鼻業右陣蠶榨全皺存錄揉擾根禁兩位羊扁型哨址慎農財醫飲堵愛嶼接猜謠撿乓暈龜啞扁支柜茂援抄進脊江歲宣心掩沿農哈從希賭掏視凈槍絞東屑晨捉壁歷篩拼灶丸譽鋪免禮視夕先灶尼撫情怖雙親商八師臟啦城會去老份泊軟跳枝赴下避封芒鞭因挎sJ100J。asp判定是蜘蛛還是普通訪問的代碼。半山娛樂SEO優化技術在線,上海翼好seo優化公司,seo沒內容,seo多久能做到首頁,閃電精靈seo免費的嗎?

如果您覺得 asp判定是蜘蛛還是普通訪問的代碼 這篇文章對您有用,請分享給您的好友,謝謝!

主站蜘蛛池模板: 久久久久亚洲AV无码专区首JN | 亚洲中文字幕无码不卡电影| 亚洲中文无码永久免| 无码人妻AⅤ一区二区三区水密桃| 日韩av片无码一区二区不卡电影| 国产成人无码A区在线观看视频| 亚洲精品无码久久毛片波多野吉衣 | 亚洲AV无码一区二区三区性色 | 波多野42部无码喷潮在线| 台湾无码一区二区| 久久精品无码一区二区三区日韩 | 无码中文av有码中文av| 丰满少妇人妻无码| 无码人妻一区二区三区免费| 在线精品自拍无码| 无码精品A∨在线观看无广告| 欧洲Av无码放荡人妇网站| 人妻中文无码久热丝袜| 免费无码AV一区二区| 特级毛片内射www无码| 久久精品亚洲AV久久久无码| 亚洲av中文无码乱人伦在线r▽ | 久久久久久久久无码精品亚洲日韩| 亚洲中文字幕久久精品无码APP | 亚洲AV无码无限在线观看不卡| 亚洲AV蜜桃永久无码精品| 无码国产精成人午夜视频不卡| 免费无遮挡无码永久视频| 日韩亚洲AV无码一区二区不卡| 伊人久久综合无码成人网| 中文字幕无码不卡在线| 亚洲精品人成无码中文毛片| 国产AV天堂无码一区二区三区| 无码人妻一区二区三区av| 无码熟妇人妻av| 无码人妻一区二区三区精品视频| 少妇久久久久久人妻无码| 亚洲精品无码aⅴ中文字幕蜜桃| 亚洲日韩精品A∨片无码加勒比| 亚洲中文字幕无码中文| 无码八A片人妻少妇久久|