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

2008/4/7 10:05:05 来源:互联网 【 】 浏览:5962次

判断访问是否来自搜索引擎的函数,有兴趣的可以试试! Chinaz^com

以下为引用的内容:
<%
'检查当前用户是否是蜘蛛人
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则判定访问为蜘蛛人
%>

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

  • 上一篇文章:ASP代码:rs.open语句详细说明
  • 下一篇文章:ASP面向对象的程序设计
    当前地址:https://dns2003.com:443/help/hlp_dtl.asp?nid=10000191
    更多帮助登录: http://www.dns2003.com/help
    业务请咨询E网时代客服部