JAVA、PHP、前端、APP、网站开发 - 开发技术学习

开发技术学习 »  » seopassword中听公开课《蜘蛛劫持代码公开》

seopassword中听公开课《蜘蛛劫持代码公开》

此文被围观2613日期: 2012-05-19 分类 :   标签:  ····

最近在seopassword中听公开课,听到了讲师分享一个蜘蛛劫持代码,觉得好玩,发来跟大家分享分享。老鸟略过。这个代码是在百度或者谷歌蜘蛛来抓取的时候自动判断,然后返回一个特定的网页。把这个代码复制以后改成.asp后缀以后放在网站根目录就可以了(请自己改成自己需要的内容)。大家不妨试试。自己可以试验下可行性

 

<!DOCTYPE html> <html dir=”ltr”> <head> <meta http-equiv=”Content-Type” content=”text/html; charset=gb2312″ /> <title>无标题文档</title> <% 定义方法函数 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,”baiduspider”,1) > 0 then GetBot=”baidu” end if end function %> <style type=”text/css”> <!– .STYLE1 {color: #FF0000} –> </style> </head> <body> <table width=”751″ height=”512″> <tr>   <td height=”132″ bgcolor=”#00CCFF”><div align=”center”>网页头文件(可以是导航栏、图片获其他内容)</div></td> </tr> <tr><td height=”311″>网页内容部分</td> </tr> <% if GetBot=”baidu” or GetBot=”google” then Response.Write “<a href=’http://adophper.com’>(友链一)adophper,PHP网站建设</a><a href=’http://www.adophper.com’>(友链二)PHP网站建设</a>” else Response.Write”不做处理,或输出任意” end if %> <tr><td bgcolor=”#CCCCCC”><div align=”center”>友情链接部分</div></td> </tr> </table> </body> </noframes></html>

站点声明:部分内容源自互联网,为传播信息之用,如有侵权,请联系我们删除。

© Copyright 2011-2024 www.kfju.com. All Rights Reserved.
超级字帖 版权所有。蜀ICP备12031064号