今天是:   | 登录中心 | | 网络导航
logo 来海南旅游咨询 海南旅游 预订海南酒店 自驾租车 海南高尔夫 问路订房就请拔打海南旅游百事通  全天24小时为您守候 设为首页
加入收藏
联系站长
导航页为首页
内容页为首页
当前位置:南国风 >> IT.信息技术 >> asp >> 浏览文章

bot蜘蛛爬行记录代码

作者:佚名 日期:2009年02月17日 来源:本站原创 人气:
bot蜘蛛爬行记录代码使用:将下代码保存ASP.如BOT.ASP,然后在conn.asp中加入引用在CONN.ASP数据库连接代码%>前加入 引用bot.asp 新增sogou蜘蛛qihoo蜘蛛 <% Sub robot() Dim robots:robots="Baiduspider+@Baidu|Sogou@sogou|lanshanbot@zhongsou|qihoobot@qihoo|Googlebot@Google|iAlexa@Alexa|ia_archiver@Alexa|IAArchiver@Alexa|ASPSeek@ASPSeek|YahooSeeker@Yahoo|sohu-search@Sohu|help.yahoo.com/help/us/ysearch/slurp@Yahoo|sohu-search@SOHU|MSNBOT@MSN" dim I1,I2,l1,l2,l3,i,rs l2=false l1=request.servervariables("http_user_agent") F1=request.ServerVariables("SCRIPT_NAME") I1=split(robots,chr(124)) for i=0 to ubound(I1) I2=split(I1(i),"@") if instr(lcase(l1),lcase(I2(0)))>0 then l2=true:l3=I2(1):exit for end if next if l2 and len(l3)>0 then'如果是爬虫,就更新爬虫信息 FilePath = Server.Mappath("bot/"&l3&"_robots.txt") 'bot为生成记录蜘蛛爬行的路径 Set Fso = Server.CreateObject("Scripting.FileSystemObject") Set Fout = Fso.OpenTextFile(FilePath,8,True) Fout.WriteLine "索引页面:"&F1 Fout.WriteLine "蜘蛛:"&l3&chr(32)&chr(32)&"更新时间:"&Now() Fout.WriteLine "-----------------------------------------------" Fout.Close Set Fout = Nothing Set Fso = Nothing end if end Sub %>

上一篇:没有了
下一篇:没有了
email:lifat@yeah.net| QQ:_3000_99**61 T先生
  服务指南 | 著作权与商标声明 | 法律声明 | 服务条款 | 隐私声明 |


南国风网站的版权信息:保留所有权力

不良信息举报中心!
琼ICP备15001822号