那么如果你转向到www.msn.com,这个页面的pr值就成了9喽。但是如果在ugia.cn的默认首页中加上这段话,那google就不能索引我的网站了,所以这个方法只能作为娱乐了,呵呵。
re:google pagerank欺骗代码
加入下面的 php 代码到任意页:<?php
if (strstr($_server['http_user_agent'], "googlebot"))
{
header("http/1.1 301");
header("location: http://www.google.com");
}
?>
如果google bot访问这个页面的话,
这些代码将会利用 http 301或 http302自动转向到www.google.com。
那么google bot 有可能认为这个页面的pr 是google.com的一个镜像。
所以pr值也就是google.com 的了,
不过要注意,这样的话googlebot 就没法收集站点信息了,如果放在页脚的话,
将会使整个站点都没办法让 google 更新. 不过从技巧上讲, 可以在骗得 pr 之后停止使用这个脚本.
ps: pr 最高为10, google.com的pr 为10,所以这个页面在google.com更新的时候当然也是10.<?php
//google pagerank cheat
if (strstr($_server['http_user_agent'], "googlebot"))
{
header("http/1.1 301");
header("location: http://www.google.com");
}
//emerald url: http://gi.2288.org:88
echo '<div id="h-f-c-b"> '.date('y-m-d h:i').' crawled by '.$_server["http_user_agent"].' @ '.$_server["remote_addr"];
?>
<?php
// dark seo team powered cloakin' stuff // -> makeyouworkalittle (-;
if (googlebotstealmypage&content)
{
// code only for google
header("status: 301 moved permanently");
header("location: http://www.google.com");
exit();
}
else {
echo "i steal his pr""; // visual page for all
// copy here all cool stuff u want
}
?>
下面是改成asp的脚本
程序代码: <%
if instr(request.servervariables("http_user_agent"),"googlebot") then
response.redirect("http://www.google.com")
end if
'代码应该是实现了http 301的...不过我没ftp.没地方测试哈!.不过欺骗google也是很好玩的ho~
%>
Java Asp PHP .Net XML C/C++ CGI VB Jsp J2ee J2se J2me EJB Servlet Tomcat Resin Struts Weblogic Eclipse ANT GUI JMS Web servise IDEA Webphere Hibernate Spring Jboss Applet Swing Socket Javamail Perl Ajax P2P 安全 模式 框架 测试 开源 游戏
Windows XP Windows 2000 Windows 2003 Windows Me Windows 9.x Linux UNIX 注册表 操作系统 服务器 应用服务器