You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+24-38Lines changed: 24 additions & 38 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,9 @@
2
2
3
3
A PHP library to detect browser, OS, platform and device type by User-Agent parsing.\
4
4
This library focused on high performance and low memory usage HTTP client parsing.\
5
-
Uses a simple and fast algorithm to accurate detection more than 120 browsers types and ~ 58 OS types.\
6
-
For most commonly browsers parsing process tooks 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 same conditioned hosting environment.\
5
+
Uses a simple and fast algorithm to accurately detect more than 165 browser types and over 60 OS types.\
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.\
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
@@ -20,20 +20,20 @@ To install, you can use composer:
20
20
composer require foroco/php-browser-detection
21
21
`
22
22
23
-
Or simply upload library file `BrowserDetection.php` (placed in the `src` directory) to your project and connect it in PHP script by use`require_once` (see usage cases bellow).
23
+
Or simply upload library file `BrowserDetection.php` (placed in the `src` directory) to your project and connect it in PHP script by using`require_once` (see usage cases bellow).
24
24
25
25
## Usage
26
26
27
27
The library will try to get environment data from the `HTTP_USER_AGENT` header sent by the HTTP client.
28
-
Library PHP Class `BrowserDetection` contains four public methods which returns Array or JSON string of recognized data from `HTTP_USER_AGENT`:
28
+
Library PHP Class `BrowserDetection` contains four public methods which return Array or JSON string of recognized data from `HTTP_USER_AGENT`:
29
29
30
30
*`getAll();`
31
31
*`getOS();`
32
32
*`getBrowser();`
33
33
*`getDevice();`
34
34
35
-
First argument should contains User-Agent string from the `HTTP_USER_AGENT` header or your custom User-Agent string.\
36
-
Second argument (optional) may contains 'JSON' if you want to get returned result as JSON format.
35
+
First argument should contain User-Agent string from the `HTTP_USER_AGENT` header or your custom User-Agent string.\
36
+
Second argument (optional) may contain 'JSON' if you want to get returned result as JSON format.
0 commit comments