Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Apr 28, 2024 via composer

jaybizzle/crawler-detect v1.2.116

CrawlerDetect is a PHP class for detecting bots/crawlers/spiders via the user agent
Package summary
Share
0
issues
1
license
1
MIT
Package created
23 Mar 2015
Version published
21 Jul 2023
Maintainers
2
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
jaybizzle/crawler-detect@v1.2.116
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of jaybizzle/crawler-detect 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does jaybizzle/crawler-detect do?

Jaybizzle/Crawler-detect is an efficient PHP library designed to detect bots, crawlers, and spiders by analyzing the 'user agent' and 'http_from' header. Currently, the library has the capability to discern thousands of bots, crawlers, and spiders making it a valuable tool for web analytics, SEO improvements, and security.

How do you use jaybizzle/crawler-detect?

To utilize the jaybizzle/crawler-detect, you need to install it first with composer by running the command: composer require jaybizzle/crawler-detect. After that, you can implement it with the following PHP code:

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; +http://help.soso.com/webspider.htm)')) {
    // true if crawler user agent detected
}

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

This example demonstrates checking if the current visitor's user agent is a crawler and if a given user agent string is a crawler. Additionally, it shows how to output the name of the detected bot.

Where are the jaybizzle/crawler-detect docs?

The documentation for jaybizzle/crawler-detect is mainly found within the README file in the GitHub repository. Additionally, further information and insights about the package can be found at crawlerdetect.io.