Sponsored by NuSphere - PHP Software for PHP Application Developers - On Sale This Week for $100 off


PHP Tutorials and Scripts   




Title: Is Googlebot here?    Marked Cool    (Review this resource)
Author: GameGuy
Posted On: 2004-11-28
Category: Home > PHP Tutorials

Popularity: 1 points out of 10    

Description: This will email you letting you know when googlebot has crawled your site :)! Really cool!

Total Hits: 1410     Total Votes: 0     Total Points: 0 (0 reviews)        [ Print ]   

Page Navigation:  [1]


Is Googlebot here?




This small little snippet will alert you when Google Bot has visited your site. It will email you saying Googlebot has visited your site ;).

Code is:


<?php

//Change the following to your email address
$to "myemail@something.com"// Your email!
$sitename "Your Site Name"// Your site name
$subject "Googlebot Detected - $sitename";
$msg "Google has crawled $sitename: " $_SERVER['REQUEST_URI'];
$mailheaders ="From: Googlebot <googlebot@google.com> \n";

if(
eregi("googlebot",$_SERVER['HTTP_USER_AGENT'])) 

    
mail($to$subject$msg$mailheaders);
}
?>
That's it! Just insert the above code into your main index file! Make sure its a PHP file tho ;)!

© 2004 GameGuy.



Page Navigation:  [1]



© Copyright 2003-2008 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.