PDA

View Full Version : View a Web Page as 'Googlebot'


topvip
2009-06-24, 05:27 PM
http://www.smart-it-consulting.com/internet/google/googlebot-spoofer/index.htm

Basic, Simple PHP Google Bot Cloaking Script


<?php
$useragent = $_SERVER['HTTP_USER_AGENT'];
$google = "Googlebot";
if (strstr($useragent, $google)) {
echo "google";
}
else
{
echo "man";
}
?>

the above code is for wordpress.

<?php if (is_home())
$useragent = $_SERVER['HTTP_USER_AGENT'];
$google = "Googlebot";
if (strstr($useragent, $google)) {
echo "google";
}
else
{
echo "man";
}
?>

topvip
2009-06-24, 05:42 PM
<?php if (is_home())
{if (ereg("Google", getenv("HTTP_USER_AGENT"))) $browser = "Designed by: <a rel='nofollow' href=http://wwww.google.com>google</a>";
else $browser = "Designed by: <a href=http://www.baidu.com>baidu</a>";
echo $browser;

}
?>