Download .zip |
Info | Documentation | View files (4) | Download .zip | Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2019-02-04 (2 months ago) | Not yet rated by the users | Total: 43 | All time: 9,503 This week: 447 |
Version | License | PHP version | Categories | |||
ua-string-parser 1.0 | Custom (specified... | 5 | HTTP, PHP 5, Parsers |
Description | Author | |
This class can parse browser user agent to extract their values. |
Parses UA strings of modern browsers.
use peterkahl\UAP\UAP;
$tmp = UAP::Parse('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Some loose text is here Chrome/67.0.3396.10 Safari/537.36');
var_dump($tmp);
/*
array(9) {
["UAP_OS_NAME"]=>
string(5) "macOS"
["UAP_OS_VERSION"]=>
string(7) "10.13.4"
["UAP_OS_LINUX"]=>
bool(false)
["UAP_BR_NAME"]=>
string(6) "Chrome"
["UAP_BR_VERSION"]=>
string(12) "67.0.3396.10"
["UAP_HW_TYPE"]=>
string(7) "desktop"
["UAP_HW_NAME"]=>
string(9) "Macintosh"
["UAP_HW_BRAND"]=>
string(5) "Apple"
["UAP_APPLE_BUILD"]=>
string(0) ""
}
*/
Files |
File | Role | Description | ||
---|---|---|---|---|
src (1 file) | ||||
composer.json | Data | Auxiliary data | ||
LICENSE | Lic. | License text | ||
README.md | Doc. | Documentation |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.