
Ever wanted to know how often Google crawls your site? This tutorial is going to show you how to make your website send you an email everytime Google visits your site.
1 2 3 4 5 6 7 | <?php if(strpos($_SERVER['HTTP_USER_AGENT'], 'Googlebot') !== false) { $email = 'you@domain.com'; mail($email,'Googlebot Alert', 'Googlebot has crawled your page: '.$_SERVER['REQUEST_URI']); } ?> |
Just paste that code in somewhere on your site. Change $email to your email address then you will be emailed every time Google visits your site.
Also, its worth mentioning that because its being sent straight from a server automatically alot of email clients will mark it as spam. So if you think its not working just check your spam box ;)






































November 7th, 2008 at 10:47 pm
Hey, You sent me your blog URL via digitalpoint forums, Thanks for this code, Will use it for some of my new domains.
Great site, will check the rest of the content here later