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. [Utility &amp; Helpers](/categories/utility)
4. /
5. unicframework/user-agent

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

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 today

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 26% 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

1875d 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.8k72.3M513](/packages/jenssegers-agent)[whichbrowser/parser

Useragent sniffing library for PHP

1.8k12.7M59](/packages/whichbrowser-parser)[foroco/php-browser-detection

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

1545.5M7](/packages/foroco-php-browser-detection)[woothee/woothee

Cross-language UserAgent classifier library, PHP implementation

107649.1k4](/packages/woothee-woothee)[whichbrowser/server

Useragent sniffing server for Javascript

426.3k](/packages/whichbrowser-server)[karmendra/laravel-agent-detector

Laravel wrapper for matomo-org/device-detector user agent parser

1249.6k](/packages/karmendra-laravel-agent-detector)

PHPackages © 2026

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