Overview
Spectre is a lightweight PHP library designed to detect AI browsers and automated bots using a hybrid detection approach.
The library combines server-side User-Agent analysis with client-side JavaScript fingerprinting to identify supported AI browsers and bots. It is designed to integrate with PHP projects such as CMS platforms, analytics systems, content protection tools and API gateways.
Spectre supports detection for AI browsers and bots including Comet, Arc, Brave, SearchGPT, Microsoft Copilot, ClaudeBot and GPTBot, according to the product documentation.
The package uses a modular driver-based architecture and modern PHP features such as enums, readonly properties and strict typing. It is designed to work without external dependencies and can be extended for additional detection requirements.
For improved detection accuracy, the documentation recommends using the hybrid detection method and caching detection results where appropriate.
Features
Hybrid browser and bot detection
Server-side PHP detection
Client-side JavaScript fingerprinting
AI browser detection
Comet detection
Arc detection
Brave detection
SearchGPT detection
Microsoft Copilot detection
ClaudeBot detection
GPTBot detection
Zero external dependencies
Modular driver-based architecture
Modern PHP 8.2+ features
Enum-based browser types
Readonly properties
Strict typing
Custom User-Agent testing
Conditional content delivery support
Lightweight library architecture
Privacy-focused detection approach
Requirements
PHP 8.2 or higher
No external dependencies required
| Category | Scripts & Code / PHP Scripts / Security |
| First release | 06 October 2026 |
| Last update | 06 October 2026 |
| Files included | Documentation |
| Tags | Spectre PHP , AI browser detection , bot detection PHP , PHP bot detection , AI browser detection library , PHP security library , browser fingerprinting , JavaScript fingerprinting , User-Agent detection , GPTBot detection , ClaudeBot detection , SearchGPT detection , Copilot detection , Comet detection , Arc detection , Brave detection , anti-bot PHP , scraper detection , AI protection , PHP 8.2 security |




