Crawler-Detect 0,1 coveralls travis-ci Packagist phpunit

CrawlerDetect is a PHP class for detecting bots/crawlers/spiders via the user agent

3 years after MIT


Build Status Total Downloads Scrutinizer Code Quality MIT Version StyleCI Coveralls branch

CrawlerDetect is a PHP class for detecting bots/crawlers/spiders via the user agent and http_from header. Currently able to detect 100's of bots/spiders/crawlers.


Run composer require jaybizzle/crawler-detect 1.* or add "jaybizzle/crawler-detect" :"1.*" to your composer.json.


use Jaybizzle\CrawlerDetect\CrawlerDetect;

$CrawlerDetect = new CrawlerDetect;

// Check the user agent of the current 'visitor'
if($CrawlerDetect->isCrawler()) {
    // true if crawler user agent detected

// Pass a user agent as a string
if($CrawlerDetect->isCrawler('Mozilla/5.0 (compatible; Sosospider/2.0; +')) {
    // true if crawler user agent detected

// Output the name of the bot that matched (if any)
echo $CrawlerDetect->getMatches();


If you find a bot/spider/crawler user agent that CrawlerDetect fails to detect, please submit a pull request with the regex pattern added to the $data array in Fixtures/Crawlers.php and add the failing user agent to tests/crawlers.txt.

Failing that, just create an issue with the user agent you have found, and we'll take it from there :)

Laravel Package

If you would like to use this with Laravel 4/5, please see Laravel-Crawler-Detect

Parts of this class are based on the brilliant MobileDetect


Related Repositories



Web Crawler/Spider for NodeJS + server-side jQuery ;-) ...



Polite, slim and concurrent web crawler. ...



Elasticsearch File System Crawler (FS Crawler) ...



A Laravel 4/5 wrapper for CrawlerDetect - the web crawler detection library ...



:books::100: Collection of learning resources i like ...

Top Contributors

JayBizzle MaxGiting GC-Mark romaricdrigon castevinz cwhsu1984 minhd nigelterry timersys dmitriynet jrean orthes piotrantosik alberto-bottarini


package version
php >=5.3.0
dev phpunit/phpunit 4.8.*
satooshi/php-coveralls 1.*


-   v1.2.20 zip tar
-   v1.2.19 zip tar
-   v1.2.18 zip tar
-   v1.2.17 zip tar
-   v1.2.16 zip tar
-   v1.2.15 zip tar
-   v1.2.14 zip tar
-   v1.2.13 zip tar
-   v1.2.12 zip tar
-   v1.2.11 zip tar
-   v1.2.10 zip tar
-   v1.2.9 zip tar
-   v1.2.8 zip tar
-   v1.2.7 zip tar
-   v1.2.6 zip tar
-   v1.2.5 zip tar
-   v1.2.4 zip tar
-   v1.2.3 zip tar
-   v1.2.2 zip tar
-   v1.2.1 zip tar
-   v1.2.0 zip tar
-   v1.1.17 zip tar
-   v1.1.16 zip tar
-   v1.1.15 zip tar
-   v1.1.14 zip tar
-   v1.1.13 zip tar
-   v1.1.12 zip tar
-   v1.1.11 zip tar
-   v1.1.10 zip tar
-   v1.1.9 zip tar