订阅/程序下载
首页 > 5ucms改进 > 正文
让5UCMS蜘蛛程序识别更多的搜索引擎
作者:Qiuss 来源:无忧建站 日期:2010/4/14 22:16:30 浏览量:1924(滞后) 人气:LOADING...(实时) 【

让5UCMS蜘蛛程序识别更多的搜索引擎

5UCMS安装目录下修改inc/function.asp

查找:' 蜘蛛机器人

function spiderbot()   
    dim agent: agent = lcase(request.servervariables("http_user_agent"))   
    dim Bot: Bot = ""  
    if instr(agent, "googlebot") > 0 then Bot = "Google"  
    if instr(agent, "mediapartners-google") > 0 then Bot = "Google Adsense"  
    if instr(agent, "baiduspider") > 0 then Bot = "Baidu"  
    if instr(agent, "sogou spider") > 0 then Bot = "Sogou"  
    if instr(agent, "yahoo") > 0 then Bot = "Yahoo!"  
    if instr(agent, "msn") > 0 then Bot = "MSN"  
    if instr(agent, "ia_archiver") > 0 then Bot = "Alexa"  
    if instr(agent, "iaarchiver") > 0 then Bot = "Alexa"  
    if instr(agent, "sohu") > 0 then Bot = "Sohu"  
    if instr(agent, "sqworm") > 0 then Bot = "AOL"  
    if instr(agent, "yodaobot") > 0 then Bot = "Yodao"  
    if instr(agent, "iaskspider") > 0 then Bot = "Iask"  
    if len(Bot) > 0 then   
        dim rs: set rs = db("select [Botname],[LastDate] From [{pre}Bots] Where [Botname]='" & Bot & "'", 3)   
        if rs.eof then rs.addnew: rs(0) = Bot   
        rs(1) = now(): rs.update: rs.close: set rs = nothing   
    end if   
end function  

替换成:

function spiderbot()   
 dim agent: agent = lcase(request.servervariables("http_user_agent"))   
 dim Bot: Bot = ""  
 '百度   
 if instr(agent, "baiduspider") > 0 then Bot = "Baiduspider"  
 if instr(agent, "baiducustomer") > 0 then Bot = "BaiduCustomer"  
 if instr(agent, "baidu-thumbnail") > 0 then Bot = "Baidu-Thumbnail"  
 if instr(agent, "baiduspider-mobile-gate") > 0 then Bot = "Baiduspider-Mobile-Gate"  
 if instr(agent, "baidu-transcoder/1.0.6.0") > 0 then Bot = "Baidu-Transcoder/1.0.6.0"  
 '谷歌google   
 if instr(agent, "googlebot/2.1") > 0 then Bot = "Googlebot/2.1"  
 if instr(agent, "googlebot-image/1.0") > 0 then Bot = "Googlebot-Image/1.0"  
 if instr(agent, "feedfetcher-google") > 0 then Bot = "Feedfetcher-Google"  
 if instr(agent, "mediapartners-google") > 0 then Bot = "Google Adsense"  
 if instr(agent, "adsbot-google") > 0 then Bot = "Google AdWords"  
 if instr(agent, "googlebot-mobile/2.1") > 0 then Bot = "Googlebot-Mobile/2.1"  
 if instr(agent, "googlefriendconnect/1.0") > 0 then Bot = "GoogleFriendConnect/1.0"  
 '雅虎yahoo   
 if instr(agent, "yahoo! slurp;") > 0 then Bot = "Yahoo! Slurp"  
 if instr(agent, "yahoo! slurp/3.0") > 0 then Bot = "Yahoo! Slurp/3.0"  
 if instr(agent, "yahoo! slurp china") > 0 then Bot = "Yahoo! Slurp China"  
 if instr(agent, "yahoofeedseeker/2.0") > 0 then Bot = "YahooFeedSeeker/2.0"  
 if instr(agent, "yahoo-blogs") > 0 then Bot = "Yahoo Blogs"  
 if instr(agent, "yahoo-mmcrawler") > 0 then Bot = "Yahoo Image"  
 if instr(agent, "yahoo contentmatch crawler") > 0 then Bot = "Yahoo AD"  
 '微软bing   
 if instr(agent, "msnbot/1.1") > 0 then Bot = "msnbot/1.1"  
 if instr(agent, "msnbot/2.0b") > 0 then Bot = "msnbot/2.0b"  
 if instr(agent, "msrabot/2.0/1.0") > 0 then Bot = "msrabot/2.0/1.0"  
 if instr(agent, "msnbot-media/1.0

本站推荐:5ucms模板 5ucms插件 微信/QQ:3876307        [复制给好友] [打印] [关闭] [返回] [顶部]
上一篇:无忧建站:谈谈5UCMS分页样式
下一篇:实现5UCMS IF语句的嵌套 最小修改方法
本站声明:本网站所载文章等内容,目的在于传递更多信息,并不代表本网赞同其观点和对其真实性负责。如涉及作品内容、版权及其它问题,请在30日内与本网联系(Email:3876307#qq.com),我们将在第一时间删除内容。若原创内容转载请注明出处。
常见问题: 什么是路径码? 如有问题,请在下方评论提问或加入5ucmsQQ群
让5UCMS蜘蛛程序识别更多的搜索引擎的关键词:5UCMS蜘蛛程序
评论信息
相关分类
本周热门
本月热门
关于我们 - 版权/免责 申明 - 建站服务 - 网站地图 - 稿件投递 - 联系我们 - 5ucms
Copyright © 2008-2015 www.5ucms.org 微信/QQ:3876307