站长论坛 站长下载 站长工具 小说阅读 域名主机 模版下载

判断访问是否来自搜索引擎的ASP函数

[ 来源:互联网 | 作者:站长胡同站整理 |  时间:2007-10-31 06:12:42 | 浏览:81次 ]

判断访问是否来自搜索引擎的函数,有兴趣的可以试试!
<%
'检查当前用户是否是蜘蛛人
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则判定访问为蜘蛛人
%>

注:本函数来源于网上,是否可用有待验证!

责编:天羽

发表评论

  称  呼:
  内  容:
 

最新教程

热门教程

推荐广告

本站推荐