 |
Title: Is Googlebot here? Marked Cool (Review this resource) Author: GameGuy Posted On: 2004-11-28 Category: Home > PHP Tutorials
Popularity:
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]
|
|
 |