php googlebot detection script

   • questions and answers  • distance calculator  • maps
   



CATEGORIES
EXCEL TUTORIAL
SQL TUTORIAL
WEB INFORMATION
WINDOWS
JAVASCRIPT SCRIPTS
COMPUTER SECURITY
GRAFIC DESIGN
HTML
PHP
CSS STYLE
ATLAS OF THE WORLD
DEVELOPER
PHOTOSHOP
MAGAZINE
TOP LISTS
LATEST ARTICLES
check if user like page facebook online tool
base64 decode online free tool javascript
base64 encode online free tool using javascript
array slice php funtion
how to tell google to not change your page title with dmoz title
md5 hash generator online tools windows linux c php
remove duplicates in html lines online javascript
documentgetelementbyid()innerhtml javascript set example
how to block processes from starting and running in windows xp
list of us american presidents with pictures
  home   PHP » PHP GOOGLEBOT DETECTION SCRIPT
google ads

PHP GOOGLEBOT DETECTION SCRIPT


Views: 342
Php Googlebot detection script



"Google doesn't post a public list of IP addresses for webmasters to whitelist. This is because these IP address ranges can change, causing problems for any webmasters who have hard coded them. The best way to identify accesses by Googlebot is to use the user-agent (Googlebot)."
http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=80553

As it google say is useless to make a list of all googlebot IPs downloaded from various sources. Therefore is more eficient to use $_SERVER['HTTP_USER_AGENT'] function in php.

The php code is:


//===================

$u_agent=$_SERVER['HTTP_USER_AGENT'];

if (eregi("Googlebot", $u_agent)) {
    echo "I'm the Googlebot!";
}

//==========================


Leave a comment

Your name *
Your comment *
   Anti Spam code *

.
Articles related to PHP GOOGLEBOT DETECTION SCRIPT
Zero result!

Tags:googlebot useragent,googlebot detect,googlebot php,google crawl detect,
1 comments

added by: David date: 06-05-12

It would be great if you had a date on your posts.... .................................................................................................................................. It's stupid to require a comment of 70 characters or more.. No wonder there aren't any comments...




the latest articles:
• Check if user like page facebook online tool
• base64 decode online free tool javascript
• base64 encode online free tool using javascript
• array slice php funtion
• How to tell google to not change your page title with DMOZ title
• MD5 hash generator Online tools Windows Linux C Php
• Remove duplicates in html lines online javascript
• documentgetElementById()innerHTML javascript set Example
• How to block processes from starting and running in Windows XP
• List of us american presidents with pictures
distancia entre moambique sfrica do sul zimbabwe
how to delete undeletable files in windows xp
how to remove width attribute from an img image with javascript
how to create a autonomous robot witch is able to get his own power from a source
how old is lionel richie
how old is jade foret

 

eXTReMe Tracker