Scripting & Programming

Googlebot notification

This simple script is going to notify you over e-mail when the Googlebot is on your website. Code: <?php if(eregi(“googlebot”,$HTTP_USER_AGENT)) { if ($QUERY_STRING != “”) { $url = “http://”.$SERVER_NAME.$PHP_SELF.’?’.$QUERY_STRING; } else { $url = “http://”.$SERVER_NAME.$PHP_SELF; } $today = date(“F j, Y, g:i a”); mail(“your@mail.com”, “Googlebot detected on http://$SERVER_NAME”, “$today – Google crawled $url”); } ?>