PHP Classes

Bot Class: Simple check to see if the current user is a robot

Recommend this page to a friend!
  Info   View files View files (1)   DownloadInstall with Composer Download .zip   Reputation   Support forum (2)   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 359 All time: 6,920 This week: 455Up
Version License PHP version Categories
bot-class 1.0GNU General Publi...5.0HTTP, PHP 5


This is a simple class to check to see if the current user is a robot.

It can check the user agent string to verify if it contains the word bot or the Facebook domain in it.

The class returns a simple Y or N value depending on whether it determine the current user is a robot or not.

Picture of Ruben Elizondo
Name: Ruben Elizondo <contact>
Classes: 1 package by
Country: Mexico Mexico
Age: ???
All time rank: 366945 in Mexico Mexico
Week rank: 246 Up5 in Mexico Mexico Up

  Files folder image Files  
File Role Description
Accessible without login Plain text file bot-class.php Example Check if the visitor is a robot

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:6,920
This week:455Up
User Comments (1)
It should return a boolean instead of a string.
8 years ago (André Karell Contreras Jiménez)