JayBizzle / Crawler-Detect

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

Home Page:https://crawlerdetect.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incorrect agent result

LinusGeffarth opened this issue · comments

commented

Mozilla/5.0 (Linux; Android 7.0; Moto G (4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.175 Mobile Safari/537.36 Chrome-Lighthouse

...is properly detected as bot in the web demo, but is NOT detected as such in code.

Just tested this locally...

use Jaybizzle\CrawlerDetect\CrawlerDetect;

$cd = new CrawlerDetect();

var_dump($cd->isCrawler('Mozilla/5.0 (Linux; Android 7.0; Moto G (4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.175 Mobile Safari/537.36 Chrome-Lighthouse'));

// Output: bool(true)

Have you got the latest version installed?

🤷

commented

Thanks for checking so quickly. You're right, my implementation was wrong. Sorry for the false alarm!