Steve Evans asked me how I know when the Google Bot spiders my site. I have some code that I add to the head section of my index.php page. This code will email me when Google is detected with the date, time, and URL of the page that was indexed.
PHP:
-
-
<?php
-
{
-
if ($QUERY_STRING != "")
-
{$url = "http://".$SERVER_NAME.$PHP_SELF.'?'.$QUERY_STRING;}
-
else
-
{$url = "http://".$SERVER_NAME.$PHP_SELF;}
-
mail("you@youremail.com", "Googlebot detected on http://$SERVER_NAME", "$today - Google crawled $url");
-
}
-
-
?>
-
Just be sure to change the email address to your own, and also sometimes the quote marks get messed up when copying and pasting so replace those to be sure they get copied correctly.
Thank you for posting this code. I plan to implement it tonight.
Keep up the great work. I enjoy reading your blog(s) I’ve read them via RSS.
Great! I was wondering if anyone was reading. At least I know there are two.
what are you using to do your source output? it’s pretty.
I’m using the iG:Syntax Hiliter plugin for WordPress.
Be Notified When Google Indexes Your Site
The GIN Google Index Notification Tool requires that you register for a free account to use the service. Works by adding a small PHP snippit to your theme templates. Also found an article by John Hesch called Google Bot Code. With his code in the hea