@@ -4,7 +4,7 @@ A PHP library to detect browser, OS, platform and device type by User-Agent pars
44This library focused on high performance and low memory usage HTTP client parsing.\
55Uses a simple and fast algorithm to accurately detect more than 165 browser types and over 60 OS types.\
66For 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.\
88The library supports only really actual Browsers and OS without support for outdated environments that are actually not used now.\
99Works by use only one library file and without any third-party libraries dependency.
1010
@@ -163,7 +163,7 @@ Returns `1` number if mobile browser works in `Desktop Mode` or returns `0` if i
163163
164164** 64 Bits Mode** (` 64bits_mode ` )\
165165Returns ` 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.
167167
168168## Usage Examples
169169
@@ -221,7 +221,7 @@ require_once('BrowserDetection.php');
221221$Browser = new foroco\BrowserDetection();
222222
223223$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);
225225print_r($result);
226226?>
227227```
@@ -310,7 +310,7 @@ $Browser = new foroco\BrowserDetection();
310310
311311$useragent = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36';
312312$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);
314314print_r($result);
315315?>
316316```
@@ -338,6 +338,7 @@ Array
338338 [browser_android_webview] => 0
339339 [browser_ios_webview] => 0
340340 [browser_desktop_mode] => 1
341+ [64bits_mode] => 0
341342)
342343```
343344
@@ -362,13 +363,13 @@ Returns:
362363{"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}
363364```
364365
365- ## Benchmarking Tests
366+ ## Benchmarking Test
366367
367368Benchmarking was performed on a low-level shared hosting.\
368369Test server configuration: RedHat Linux + LiteSpeed + PHP Extension.\
369370Test conditions based on collection of random ~ 446000 non repeated real life User-Agent strings.
370371
371- Recognition performance in PHP 7.3 (Requests Per Second ):
372+ User-Agent recognition performance in PHP 7.3 (requests per second ):
372373
373374```
374375getAll: ~ 31000 rps
0 commit comments