JimWorld Forums: Google bot monitor



Posted By: bretheartbobby ()
Posted On: 11/14/2007 09:09 pm

This is a free php script that notifies you when google bot visits your page. To install this script, simply copy paste into your page and edit email address you want to be notified.

if(eregi("googlebot",$_SERVER['HTTP_USER_AGENT'])) {
$s = "";
foreach($_SERVER as $item => $value) {
$s .= "n$item : $value";
}
$sdate = date("Y-m-d h:i:s" ) ;
$message = <<<MESSAGE
Visit date:$sdate
Information:
=================================
$s
=================================
MESSAGE;
if($google_alert) {
mail("youremail@yourdomain.com", "googlebot alert", $message);
}
}

[ Message was edited by: JimBot 05/08/2008 11:12 am ... Reason: Removed Smiley Error. ]




Posted By: michelrobinson ()
Posted On: 12/13/2007 10:20 pm

Thanks for this script.


Posted By: Prowler (Moderator)
Posted On: 12/14/2007 10:21 pm

There is a caveat. Unless you have a single page site, you will be inundated with tons of mails if you have a normal site with hundreds of pages. Google bot is one of the most active bots around.


Posted By: g1smd (Moderator)
Posted On: 12/15/2007 03:11 am

I looked at the logs for a site a few days ago, and Google accesses about 3000 URLs per day on the site, every day.

That's more than a million accesses per year.


Posted By: Curt ()
Posted On: 12/19/2007 08:03 pm

That's why you would only put this script on the home page.


Posted By: chetan1 ()
Posted On: 05/08/2008 03:58 am

Its great script.I had not heard about this script.Really Very nice.I will try this.

thanks buddy



[ Message was edited by: JimBot 05/08/2008 11:10 am ]




Posted By: Quadrille ()
Posted On: 05/08/2008 04:38 am

I don't think the smiley face should be there, should it? wink

And is that code going to facilitate email harvesting?

Personally, I can't see the point; it isn't hard to check your stats once in a while - who really needs to know in real time?


Posted By: Quadrille ()
Posted On: 05/08/2008 04:44 am

chetan1 - you may care to remove the link drop - if a moderator gets there first, you may be in Trouble!


Posted By: Prowler (Moderator)
Posted On: 05/09/2008 12:38 am

>>And is that code going to facilitate email harvesting?

No. It is inside the server side script and when it is executed it won't show anything in the browser.



JimWorld Forums © 1996 - 2004 .... iWeb Technology, Jimworld.com