PHPackages                             unicframework/user-agent - 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. unicframework/user-agent

ActiveLibrary

unicframework/user-agent
========================

User agent library parse client browsers all data from request.

v1.0.1(5y ago)097MITPHPPHP &gt;=5.6

Since Feb 15Pushed 5y ago1 watchersCompare

[ Source](https://github.com/unicframework/user-agent)[ Packagist](https://packagist.org/packages/unicframework/user-agent)[ Docs](https://unicframework.github.io/user-agent)[ RSS](/packages/unicframework-user-agent/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

User Agent
----------

[](#user-agent)

User agent library parse client browsers all data from request.

- **ip** : get user ip address.
- **os** : get user device os name.
- **osVersion** : get user device os version.
- **browser** : get user browser name.
- **browserVersion** : get user browser version.
- **deviceType** : get user device type.
- **deviceBrand** : get user device brand.
- **referrer** : get http referrer.
- **isReferred** : check request is referred or not.
- **userAgent** : get browser user agent.

### Installation

[](#installation)

- Install `composer` if you have not installed.

```
composer require unicframework/user-agent
```

### Example

[](#example)

```
use UserAgent\UserAgent;

// Parse current request user agent
$user = new UserAgent();

// Parse custom user agent string
$user = new UserAgent($_SERVER['HTTP_USER_AGENT']);

// Get client ip address
echo $user->ip;

// Get client os
echo $user->os;

// Get client os version
echo $user->osVersion;

// Get client browser
echo $user->browser;

// Get client browser version
echo $user->browserVersion;

// Get client device type (Phone, iPhone, Computer, etc.)
echo $user->deviceType;

// Get client device brand name (Apple, Samsung, Lenovo, etc.)
echo $user->deviceBrand;

// Get client referrer
echo $user->referrer;

// Check client is referred or not
if($user->isReferred) {
  //Client is referred
}

// Get client user agent
echo $user->userAgent;
```

License
-------

[](#license)

[MIT License](https://github.com/unicframework/user-agent/blob/main/LICENSE)

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

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

Every ~88 days

Total

2

Last Release

1828d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/32831684?v=4)[Rajkumar Dusad](/maintainers/rajkumardusad)[@rajkumardusad](https://github.com/rajkumardusad)

---

Top Contributors

[![rajkumardusad](https://avatars.githubusercontent.com/u/32831684?v=4)](https://github.com/rajkumardusad "rajkumardusad (5 commits)")

---

Tags

useragentunic frameworkUserAgent Parser

### Embed Badge

![Health badge](/badges/unicframework-user-agent/health.svg)

```
[![Health](https://phpackages.com/badges/unicframework-user-agent/health.svg)](https://phpackages.com/packages/unicframework-user-agent)
```

###  Alternatives

[jenssegers/agent

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

4.8k67.8M440](/packages/jenssegers-agent)[matomo/device-detector

The Universal Device Detection library, that parses User Agents and detects devices (desktop, tablet, mobile, tv, cars, console, etc.), clients (browsers, media players, mobile apps, feed readers, libraries, etc), operating systems, devices, brands and models.

3.5k23.5M111](/packages/matomo-device-detector)[whichbrowser/parser

Useragent sniffing library for PHP

1.8k11.6M50](/packages/whichbrowser-parser)[donatj/phpuseragentparser

Lightning fast, minimalist PHP UserAgent string parser.

60417.1M60](/packages/donatj-phpuseragentparser)[foroco/php-browser-detection

Ultra fast PHP library to detect browser, OS, platform and device type by User-Agent parsing

1554.7M7](/packages/foroco-php-browser-detection)[thadafinser/user-agent-parser

UserAgent parsing done right http://useragent.mkf.solutions/

249316.9k2](/packages/thadafinser-user-agent-parser)

PHPackages © 2026

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