-
Notifications
You must be signed in to change notification settings - Fork 0
berry.utils.CrawlerDetector
Nikos Siatras edited this page Sep 30, 2022
·
7 revisions
CrawlerDetector class implements methods to detect crawlers and bots visiting the website.
The following example initializes a CrawlerDetector object and checks if the current client visiting the website is a crawler.
require_once(__DIR__ . "/utils/CrawlerDetector.php");
$crawlerDetector = new CrawlerDetector();
$crawlerName = $crawlerDetector->getCrawlerName();
if ($crawlerName != "")
{
print "Cralwer Detected: " . $crawlerDetector;
}