UASparser is a PHP parser and classifier for user agent strings presented by HTTP clients using databases from

Installs: 3 384

Dependents: 0

Stars: 15

Watchers: 3

Forks: 8

Open Issues: 1

Language: PHP

v0.54 2015-07-07 11:54 UTC


A User Agent String parser for PHP

Build Status Coverage Status Dependency Status Depending Status

Scrutinizer Quality Score Code Coverage

Latest Stable Version Latest Unstable Version

Bitdeli Badge

This is a parser and classifier for user agent strings presented by HTTP clients.

This code is based on the libraries by Jaroslav Mallat available from

Licensed under the LGPL, see license.txt for details.

This version improved by Marcus Bointon:

  • Maintained on GitHub
  • Published on
  • Creates a UAS namespace
  • Adds unit tests
  • Adds Travis config
  • Removes the view source option for security
  • Makes the downloadData function public so it can be done on demand
  • Uses the system temp dir for default cache location
  • Cleans up phpdocs
  • Reformats code in PSR-2 style
  • Fixes poor code in the example script
  • Improves error handling and debugging, adds variable timeouts
  • Adds support for gzip compression of database downloads
  • Adds PSR-0 autoload config


Release notes may be found in the changelog.

Generate PHPDocs like this:

phpdoc --directory UAS --target ./phpdoc --ignore Tests/ --sourcecode --force --title UASParser