LightTPD

LightTPD Forthcoming - Installing, compiling, configuring, optimizing, and securing this lightning-fast web server This is your fast guide to getting started and getting inside the LightTPD web server. Written from a developer's perspecti...

Tracking Google and Googlebot Using PHP Print E-mail
User Rating: / 3
PoorBest 

Many people work for hours and hours, days and days to make sure the Web site they have is ready for Google and it's Googlebot whenever it might come for a visit.

The problem most folks run into though is how do you know it is there? Some forum and blogging scripts come with better ways to track bots as they comb through your pages. What about everyone else though? Well this is where these scripts come in. All you need is to be able to parse PHP through your Web site and you too can track the Googlebot even better.

I am not totally sure who wrote these PHP scripts up first, but I have not seen it talked about many places at all. Hopefully this will a handy tool for you to use.

Easy Version

With this version of the script you need to replace the "yourdomainname.com" with your own domain name and replace " This e-mail address is being protected from spam bots, you need JavaScript enabled to view it " with your E-mail address.

<?<br> if(eregi("googlebot",$HTTP_USER_AGENT))<br> {<br> mail(" This e-mail address is being protected from spam bots, you need JavaScript enabled to view it ", "Googlebot detected<br> on yourdomainname.com", "Google has crawled <br> yourdomainname.com");<br> }<br> ?>

Expert Version

<?<br> if(eregi("googlebot",$HTTP_USER_AGENT))<br> {<br> if ($QUERY_STRING != "")<br> {$url = "http://".$SERVER_NAME.$PHP_SELF.'?'.$QUERY_STRING;}<br> else<br> {$url = "http://".$SERVER_NAME.$PHP_SELF;}<br> $today = date("F j, Y, g:i a");<br> mail(" This e-mail address is being protected from spam bots, you need JavaScript enabled to view it ", "Googlebot detected <br> on http://$SERVER_NAME", "$today - Google <br> crawled $url");<br> }<br> ?>

Hopefully this will be of some use to people working on their Web sites who want to keep a better eye on where the Googlebot is looking at.

Visit Authors Website
www.freebooksoft.com

Richard Daris http://www.freebooksoft.com

 
< Prev   Next >