PHPackages                             bradstinson/uaparser - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. bradstinson/uaparser

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

bradstinson/uaparser
====================

User-agent parser library

0.0.1(13y ago)058MITPHPPHP &gt;=5.3.0

Since Dec 4Pushed 9y ago1 watchersCompare

[ Source](https://github.com/bradstinson/uaparser)[ Packagist](https://packagist.org/packages/bradstinson/uaparser)[ Docs](https://github.com/bradstinson/uaparser)[ RSS](/packages/bradstinson-uaparser/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

UAParser \[DEPRECATED\]
=======================

[](#uaparser-deprecated)

NOTE: This code is no longer maintained or supported. I recommend using the following package instead:

UAParser takes advantage of the browser-detection library "ua-parser-php". ()

I cannot take any credit for the original library, I just wrapped it up to make it work with only static calls.

Usage
-----

[](#usage)

The following functions are available to use:

```
echo UserAgent::full();
// -> Chrome 16.0.912/Mac OS X 10.6.8

echo UserAgent::browserFull();
// -> "Chrome 16.0.912"

echo UserAgent::browser();
// -> "Chrome"

echo UserAgent::version();
// -> "16.0.912"

echo UserAgent::major();
// -> 16 (minor, build, & revision also available)

echo UserAgent::osFull();
// -> "Mac OS X 10.6.8"

echo UserAgent::os();
// -> "Mac OS X"

echo UserAgent::osVersion();
// -> "10.6.8"

echo UserAgent::osMajor();
// -> 10 (osMinor, osBuild, & osRevision also available)

/*
* in select cases the device information will also be captured
*/

echo UserAgent::deviceFull();
// -> "Palm Pixi 1.0"

echo UserAgent::device();
// -> "Palm Pixi"

echo UserAgent::deviceVersion();
// -> "1.0"

echo UserAgent::deviceMajor();
// -> 1 (deviceMinor also available)

/*
* Some other generic boolean options
*/

echo UserAgent::isMobile();
// -> (would return true if the browser met the criteria of a mobile browser based on the user agent information)

echo UserAgent::isMobileDevice();
// -> (would return true if the device met the criteria of a mobile device based on the user agent information)

echo UserAgent::isTablet();
// -> (would return true if the device was a tablet according to the user agent information)

echo UserAgent::isSpider();
// -> (would return true if the device was a spider according to the user agent information)

echo UserAgent::isComputer();
// -> (would return true if the device was a computer according to the user agent information)

echo UserAgent::isUIWebview();
// -> (would return true if the user agent was from a uiwebview in ios)

```

---

This asset library was inspired by and uses components from the following libraries:

- [ua-parser-php](https://github.com/tobie/ua-parser/tree/master/php)
- [matthiew/uaparser](https://github.com/Matthiew/Symfony2UAparser)

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4911d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3374e401d17b6c8274b943c9d05a4b23a8b343f3010acb5fc26762f42b224541?d=identicon)[bradstinson](/maintainers/bradstinson)

---

Top Contributors

[![bradstinson](https://avatars.githubusercontent.com/u/1078917?v=4)](https://github.com/bradstinson "bradstinson (3 commits)")

---

Tags

user agentuauaparserua-parser-php

### Embed Badge

![Health badge](/badges/bradstinson-uaparser/health.svg)

```
[![Health](https://phpackages.com/badges/bradstinson-uaparser/health.svg)](https://phpackages.com/packages/bradstinson-uaparser)
```

###  Alternatives

[jenssegers/agent

Desktop/mobile user agent parser with support for Laravel, based on Mobiledetect

4.8k67.8M440](/packages/jenssegers-agent)[whichbrowser/parser

Useragent sniffing library for PHP

1.8k11.6M50](/packages/whichbrowser-parser)[hisorange/browser-detect

Browser &amp; Mobile detection package for Laravel.

1.1k10.1M50](/packages/hisorange-browser-detect)[cbschuld/browser.php

A PHP Class to detect a user's Browser. This encapsulation provides a breakdown of the browser and the version of the browser using the browser's user-agent string. This is not a guaranteed solution but provides an overall accurate way to detect what browser a user is using.

5876.7M19](/packages/cbschuld-browserphp)[jaybizzle/laravel-crawler-detect

A Laravel package to detect web crawlers via the user agent

3232.6M17](/packages/jaybizzle-laravel-crawler-detect)[garetjax/phpbrowscap

Standalone replacement for php's native get\_browser() function

437862.4k5](/packages/garetjax-phpbrowscap)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
