Search for in
All Guides Skem9 MySpace Friendster HI5 MyYearBook VampireFreaks CSS HTML PHP Animation Shop Gimp Paint Shop Pro Photoshop Photoshop Elements Appetizers Beverages Cakes Candy Cookies Desserts Low Carb Main Courses Pies Salad Dressings & Sauses Side Dishes Soups and Stew Sugar Free Vegetarian Movies Television Experiments Sicknesses Play Station Yo mama Blonde Goofy Dirty
Be notified when Google crawls your page
PHP Coding Tutorials | Submited Apr 11, 2008
Written by: Mr. ∃v¡l
This is a simple guide. It send you an email when a GoogleBot crawls one of your pages.
- Notes -
This is simple; Copy/paste/replace.
Where it says
blahh@blahh.org is where you put the email address you want to be notified at.
- Code -
<?php
//Check to see if it's Googlebot:
if (strpos( $_SERVER['HTTP_USER_AGENT'], 'Googlebot' ) !== false ) {
// Define the email address where it'll be sent:
$yourEmail = 'blahh@blahh.org';
// Sned the email:
mail($yourEmail,'Googlebot Alert', 'A Googlebot crawled '.$_SERVER['REQUEST_URI']);
} // End if(googlebot)
?>