UserAgent
Less than 1 minute
UserAgent
class UserAgentConstants
BOT_MARKERS
private const BOT_MARKERS = array (
0 => 'bot',
1 => 'spider',
2 => 'crawl',
3 => 'curl/',
4 => 'wget/',
5 => 'python-requests',
6 => 'headless',
)Properties
raw
public string $rawType: string
platform
public string $platformType: string
browser
public string $browserType: string
browserVersion
public string $browserVersionType: string
isMobile
public bool $isMobileType: bool
isBot
public bool $isBotType: bool
Methods
__construct
public __construct(string $userAgent): voidParameters
| Parameter | Type | Description |
|---|---|---|
$userAgent | string |
detectPlatform
private detectPlatform(string $userAgent): stringReturns: string
Parameters
| Parameter | Type | Description |
|---|---|---|
$userAgent | string |
detectBrowser
private detectBrowser(string $userAgent): stringReturns: string
Parameters
| Parameter | Type | Description |
|---|---|---|
$userAgent | string |
detectBrowserVersion
private detectBrowserVersion(string $userAgent, string $browser): ?stringReturns: string
Parameters
| Parameter | Type | Description |
|---|---|---|
$userAgent | string | |
$browser | string |
detectBot
private detectBot(string $userAgent): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$userAgent | string |
Generated by Hazaar API Doc Generator on Fri, 04 Sep 2026 23:32:17 +0000