PHP Classes
elePHPant
Icontem

Bot recognizer and dispatcher: Recognize and handle Web robot by IP or user agent

Recommend this page to a friend!
  Info   View files View files (7)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2009-11-04 (6 years ago) RSS 2.0 feedStarStarStarStarStar 80%Total: 1,200 This week: 1All time: 3,053 This week: 1,047Up
Version License PHP version Categories
bot_recognizer 1.0BSD License5.0HTTP, PHP 5, Security
Description Author

This class can be used to recognize and handle Web robots by IP address or user agent.

It can check the IP address of the computer or the user agent of the browser program currently accessing the Web server to determine if it is within a range of IP addresses known to be of Web robots like search engine site crawlers or even malicious crawlers.

The class can call different callback functions depending on the type of crawler that was identified.

It can also be set on debug mode by taking a given IP address or string as user agent instead of the user agent string sent by the accessing browser.

The Web robots information is stored in a database. The class can load that database from a text data file. The database can be accessed using supplied database class or a database adapter class from the Zend Framework.

Innovation Award
PHP Programming Innovation award nominee
October 2009
Number 2


Prize: One downloadable copy of PhpED Professional
If you want to detect whether the computer accessing a site is from a person, a search engine robot crawling your site or some kind a malicious program, you can check the user agent header.

However, that header can be forged with a misleading value to pretend that it is a search engine robot.

This class provides a more reliable solution that checks the IP address of the computer accessing the site against a list of IP address ranges known to be used by to search engine robots.

Manuel Lemos
Picture of Alexander Selifonov
  Performance   Level  
Name: Alexander Selifonov <contact>
Classes: 19 packages by
Country: Russian Federation Russian Federation
Innovation award
Innovation award
Nominee: 15x

Winner: 2x

  Files folder image Files  
File Role Description
Plain text file bot_recognizer.php Class Main class module
Accessible without login Plain text file as_dbutils.php Aux. Database access wrapper, used in main module
Accessible without login Plain text file bot-defs.txt Data Initial bot definitions file
Accessible without login Plain text file import-botdefs.php Aux. Script for creating initial definition table in SQL database and import data from text source
Accessible without login Plain text file using-sample.php Example Using example script
Accessible without login HTML file bot_recognizer.en.htm Doc. Documentation (english)
Accessible without login HTML file bot_recognizer.ru.htm Doc. Documentation (russian)

 Version Control Unique User Downloads Download Rankings  
 0%
Total:1,200
This week:1
All time:3,053
This week:1,047Up
 User Ratings  
 
 All time
Utility:100%StarStarStarStarStarStar
Consistency:100%StarStarStarStarStarStar
Documentation:100%StarStarStarStarStarStar
Examples:100%StarStarStarStarStarStar
Tests:-
Videos:-
Overall:80%StarStarStarStarStar
Rank:15