Tuesday, February 23, 2010

When Google Bot visits your web page

I found a great tool (Script) by which you can get when Google Bot visits your page
.Try the following code ,Just put it in your header, footer or wherever to think to convenient (But this Tricks works on PHP based pages only) -

if ( strpos( $_SERVER['HTTP_USER_AGENT'], ‘Googlebot’ ) !== false )
{
// The email address we want to send the email to
$email_address = ‘YOUREMAIL@EMAIL.COM’;
// Send the email
mail($email_address,’Googlebot Visit’, ‘Googlebot has visited YOURSITE.COM: ‘.$_SERVER['REQUEST_URI']);
}
?>

No comments: