Simple PHP Class (OOP based) to detect as many bots you like
Want to Detect Bot? Want to know When they visit you? Easy ! Yes – It detects web crawlers/bots. Right now it supports 175 bots. You can extend the list anytime It is very flexible! Advanced Bot Detection & Notifier – Notifies you via email whenever particular bot visits – You can set particular both to target notification Detects bots – you can extend the list of bots Selected Bot(s) Notification via Email Allow/Disallow Bot(s). Examples included Easy to Use. Lightweight. Well Documented. Many Examples included. Uses standard PHP – No additional extension support needed. Detection – Minimum 2 Line of Code. Very Flexible – You can specify your custom detection routine. Extendible Bots List. Comprehensive List of Bots included (Approx. 175 bots). Ease of Integration. Highly Readable Code. Self Explanatory. Fully OOP based – PHP 5 Ease to Test – Builtin Support for Testing. Addons – Free
Comprehensive List of Robots
Examples Following are the quick examples:
Generic Example
$oBot = new clsBot(); try { if($oBot->Detect()->isDetected()) { echo "<strong>Bot Detected! Bot: </strong> " . $oBot->getBot(); } else { echo "<strong>No Bot Detected</strong>"; } }catch(Exception $ex){echo $ex->getMessage();}
Bot Black-Listed/Allowed?
$oBot = new clsBot(); $oBot->setBlackList(array('link')); if($oBot->isBlackListed()) { // do what ever you want to do! //Example: die('You are not allowed to utilize our resources'); }
Bot Notification
$oBot = new clsBot(); $oBot->setNotificationList(array("googlebot", "yahoo", "ask", "bing", "msn", "teoma")); $oBot->Notify('email@example.com', 'to@example.com');
Helper Methods
$oBot = new clsBot(); if($oBot->isGoogleBot()) { echo "Google's Bot Detected"; }
if($oBot->isYahoo()) { echo "Yahoo's Bot Detected"; }
if($oBot->isTeoma()) { echo "Teoma's Bot Detected"; }
Follow Me