@@ -4,7 +4,7 @@ A PHP library to detect browser, OS, platform and device type by User-Agent pars
4
4
This library focused on high performance and low memory usage HTTP client parsing.\
5
5
Uses a simple and fast algorithm to accurately detect more than 165 browser types and over 60 OS types.\
6
6
For most commonly browsers parsing process took less than 0.0005 second even on low-level shared hosting.\
7
- In the case of very unusual User-Agents recognized time is less than 0.0008 second for the same conditioned hosting environment.\
7
+ In the case of rare User-Agents recognized time is less than 0.0008 second for the same conditioned hosting environment.\
8
8
The library supports only really actual Browsers and OS without support for outdated environments that are actually not used now.\
9
9
Works by use only one library file and without any third-party libraries dependency.
10
10
@@ -163,7 +163,7 @@ Returns `1` number if mobile browser works in `Desktop Mode` or returns `0` if i
163
163
164
164
** 64 Bits Mode** (` 64bits_mode ` )\
165
165
Returns ` 1 ` number if operating system (OS) and browser work together in 64-bit mode or returns ` 0 ` if 64-bit mode not detected.\
166
- Available only for ` getAll(); ` and ` getOS(); ` methods.\
166
+ Available only for ` getAll(); ` and ` getOS(); ` methods.
167
167
168
168
## Usage Examples
169
169
@@ -221,7 +221,7 @@ require_once('BrowserDetection.php');
221
221
$Browser = new foroco\BrowserDetection();
222
222
223
223
$useragent = 'Mozilla/5.0 (Linux; arm_64; Android 9; LLD-L31) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.136 YaBrowser/20.2.4.153.00 Mobile Safari/537.36';
224
- $result = $Browser->getBrowser ($useragent);
224
+ $result = $Browser->getOS ($useragent);
225
225
print_r($result);
226
226
?>
227
227
```
@@ -310,7 +310,7 @@ $Browser = new foroco\BrowserDetection();
310
310
311
311
$useragent = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36';
312
312
$Browser->setTouchSupport(); // Call if Touch events detected in browser by JavaScript code ('ontouchstart' in window)
313
- $result = $Browser->getBrowser ($useragent);
313
+ $result = $Browser->getAll ($useragent);
314
314
print_r($result);
315
315
?>
316
316
```
@@ -338,6 +338,7 @@ Array
338
338
[browser_android_webview] => 0
339
339
[browser_ios_webview] => 0
340
340
[browser_desktop_mode] => 1
341
+ [64bits_mode] => 0
341
342
)
342
343
```
343
344
@@ -362,13 +363,13 @@ Returns:
362
363
{"os_type":"mobile","os_family":"macintosh","os_name":"iOS","os_version":6,"os_title":"iOS 6","device_type":"mobile","browser_name":"Chrome","browser_version":78,"browser_title":"Chrome 78","browser_chrome_original":1,"browser_firefox_original":0,"browser_safari_original":0,"browser_chromium_version":78,"browser_gecko_version":0,"browser_webkit_version":0,"browser_android_webview":0,"browser_ios_webview":0,"browser_desktop_mode":0,"64bits_mode":0}
363
364
```
364
365
365
- ## Benchmarking Tests
366
+ ## Benchmarking Test
366
367
367
368
Benchmarking was performed on a low-level shared hosting.\
368
369
Test server configuration: RedHat Linux + LiteSpeed + PHP Extension.\
369
370
Test conditions based on collection of random ~ 446000 non repeated real life User-Agent strings.
370
371
371
- Recognition performance in PHP 7.3 (Requests Per Second ):
372
+ User-Agent recognition performance in PHP 7.3 (requests per second ):
372
373
373
374
```
374
375
getAll: ~ 31000 rps
0 commit comments