I was talking to some guys in the business the other day about SEO. I told them about this little piece of script I found years ago that shows when Googlebot comes around your site to visit by sending an email to you. I was amazed that these guys had never heard of such a script or tool. I mean doesn’t everybody want to know when Googlebot has paid a little visit to your site?
Anyway, for all of those who don’t use this yet, this is the one I use. Just put it in your header, footer or whatever.
|
<?php
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']);
}
?>
|
8 CommentsPost by admin
coday whizzite says :
February 27, 2010 at 2:10 AM
i have no idea what a header or footer is, i have no idea where to put a script
Christyleh says :
February 28, 2010 at 6:59 AM
what good does it get?
stocazzo says :
March 1, 2010 at 12:03 AM
@coday: if you don’t have a footer or a header you can put it in the whatever.
karan says :
March 2, 2010 at 8:22 AM
thanks dude
GreekPswnio™ says :
March 4, 2010 at 9:13 AM
thanks .. Googlebot visits one site more than once a day ??
moneyonlinerevs says :
March 7, 2010 at 4:33 PM
‘HTTP_USER_AGENT’
‘.$_SERVER[‘REQUEST_URI’
Regarding the items enclosed in ‘xxx’– do we need to specify our server’s name?
Pekanbaru Riau says :
March 10, 2010 at 11:10 AM
I think I’ll try it… thanks…
ark says :
February 11, 2010 at 1:04 AM
This is cool. I think I’ll try it. Thanks for sharing.