We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
CrawlerDetector class implements methods to detect crawlers and bots, such as Googlebot, Bingbot, Ahrefsbot and others, visiting the website.
public function getCrawlerName():string
If the current client is a crawler then this method returns the crawler's name. Otherwise it returns "" (String empty)
The following example initializes a CrawlerDetector object and checks if the current client visiting the website is a crawler.
require_once(__DIR__ . "/berry/utils.php"); // Include berry utils package $crawlerDetector = new CrawlerDetector(); $crawlerName = $crawlerDetector->getCrawlerName(); if ($crawlerName != "") { print "Crawler Detected: " . $crawlerName; }