I found this code various places around the 'net, which emails you whenever the Googlebot is detected, has anyone else tried something like it? I'm not sure if the mail statement will work or not.
(I thought I first read about it on here, but I can't find any references to it). I'm assuming it works now, an ELSE condition is detected.
mail("email@example.com", "Googlebot detected", "Google has crawled : ".$_SERVER['REQUEST_URI']);
I threw it in a CODE section to know when specific page is crawled (like home or news page). The original was wrapped in
<?php & ?> so it would work in index.php of course.
If you try it, watch out your browser/editor doesn't "helpfully" convert the quotes to proper opening and closing quotation marks - it was driving me bonkers trying to figure out why I was getting an error!