jaybizzle/crawler-detect
Detect bots, crawlers, and spiders in PHP by matching User-Agent and HTTP_FROM headers. CrawlerDetect recognizes thousands of known user agents, is regularly updated, lets you check current or provided user agents, and can return the matched crawler name.
Enhanced Fraud & AI-Driven Bot Mitigation for Laravel Applications
public function handle($request, Closure $next) {
$crawler = app(CrawlerDetect::class);
if ($crawler->isCrawler(['ChatGPT-User', 'claude-web'])) {
abort(403, 'AI scraping prohibited');
}
return $next($request);
}
Mobile & Edge-Crawler Defense
Scalable Bot Signature Updates
// Auto-blocks new scrapers without code changes
if ($crawler->isCrawler()) {
\Log::warning('Blocked crawler: ' . $crawler->getMatches()[0]);
}
SEO & Compliance for AI-First Publishers
@if($crawler->isCrawler(['Googlebot', 'Bingbot']))
<meta name="robots" content="index,follow">
@elseif($crawler->isCrawler(['ChatGPT-User', 'claude-web']))
<meta name="robots" content="noindex">
@endif
Roadmap: Proactive Bot Defense
getMatches() to log bot attempts in Nova’s audit trails, enabling real-time fraud monitoring for non-technical stakeholders.Adopt This Package If:
noindex for LLMs).Look Elsewhere If:
"This update adds AI scraper blocking (ChatGPT, Claude) and mobile harvester defense, cutting data leakage risks while improving SEO. Key wins:
"v1.3.11 adds:
composer require jaybizzle/crawler-detect and update middleware. Zero downtime.""New in v1.3.11:
$crawler->isCrawler(['ChatGPT-User']).NetworkingExtension signature added.Googlebot, block ChatGPT-User in Blade.
Example:if ($crawler->isCrawler(['claude-web'])) {
return response()->json(['error' => 'AI scraping prohibited'], 403);
}
No breaking changes—just better bot coverage."
How can I help you explore Laravel packages today?