UA String Parser: Parse browser user agent to extract their values

Recommend this page to a friend!
  Info   Documentation   View files (4)   Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 50 All time: 9,834 This week: 353
Version License PHP version Categories
ua-string-parser 1.0Custom (specified...5HTTP, PHP 5, Parsers
Description Author

This class can parse browser user agent to extract their values.

Picture of Peter Kahl
  Performance   Level  
Name: Peter Kahl <contact>
Classes: 37 packages by
Country: United Kingdom
Age: ???
All time rank: 46522 in United Kingdom
Week rank: 48 2 in United Kingdom
Innovation award
Innovation award
Nominee: 23x

Winner: 2x


User Agent Parser

Downloads License If this project has business value for you then don't hesitate to support me with a small donation.

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');


array(9) {
  string(5) "macOS"
  string(7) "10.13.4"
  string(6) "Chrome"
  string(12) "67.0.3396.10"
  string(7) "desktop"
  string(9) "Macintosh"
  string(5) "Apple"
  string(0) ""


File Role Description
src (1 file)
composer.json Data Auxiliary data
LICENSE Lic. License text Doc. Documentation

  Files  /  src  
File Role Description
   UAP.php Class Class source

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:9,834
This week:353

For more information send a message to info at phpclasses dot org.