最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
判断访问是否来自搜索引擎
时间:2022-07-02 23:04:29 编辑:袖梨 来源:一聚教程网
'检查当前用户是否是蜘蛛人
Function check(user_agent)
allow_agent=split("Baiduspider,Scooter,ia_archiver,Googlebot,FAST-WebCrawler,MSNBOT,Slurp",",")
check_agent=false
For agenti=lbound(allow_agent) to ubound(allow_agent)
If instr(user_agent,allow_agent(agenti))>0 then
check_agent=true
exit for
end if
Next
check=check_agent
End function
user_agent=Request.ServerVariables("HTTP_USER_AGENT")
'check(user_agent)=true则判定访问为蜘蛛人
%>
function GetBot()
'查询蜘蛛
dim s_agent
GetBot=""
s_agent=Request.ServerVariables("HTTP_USER_AGENT") ‘关键判断语句
if instr(1,s_agent,"googlebot",1) >0 then
GetBot="google"
end if
if instr(1,s_agent,"msnbot",1) >0 then
GetBot="MSN"
end if
if instr(1,s_agent,"slurp",1) >0 then
GetBot="Yahoo"
end if
if instr(1,s_agent,"baiduspider",1) >0 then
GetBot="baidu"
end if
if instr(1,s_agent,"sohu-search",1) >0 then
GetBot="Sohu"
end if
if instr(1,s_agent,"lycos",1) >0 then
GetBot="Lycos"
end if
if instr(1,s_agent,"robozilla",1) >0 then
GetBot="Robozilla"
end if
end function
if GetBot="baidu" then
'给百度定制的内容
elseif GetBot="google" then
'给google 定制的内容
end if
%>
相关文章
- 第一狂战士卡赞土罐具体位置介绍说明 10-01
- 第一狂战士卡赞狂龙赫斯机制介绍及打法分享 10-01
- 第一狂战士卡赞蝰蛇机制介绍及打法分享 10-01
- 第一狂战士卡赞强力开荒套装获取方法 10-01
- 第一狂战士卡赞强力流派加点攻略分享 10-01
- 撩人的情话套路短句一问一答 10-01