PHPackages                             fyre/useragent - 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. fyre/useragent

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

fyre/useragent
==============

A user agent library.

v3.0.1(7mo ago)08.1k↓84.6%1MITPHP

Since Dec 9Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/elusivecodes/FyreUserAgent)[ Packagist](https://packagist.org/packages/fyre/useragent)[ RSS](/packages/fyre-useragent/feed)WikiDiscussions main Synced 2w ago

READMEChangelog (10)Dependencies (4)Versions (24)Used By (1)

FyreUserAgent
=============

[](#fyreuseragent)

**FyreUserAgent** is a free, open-source user agent library for *PHP*.

Table Of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Basic Usage](#basic-usage)
- [Methods](#methods)

Installation
------------

[](#installation)

**Using Composer**

```
composer require fyre/useragent

```

In PHP:

```
use Fyre\Http\UserAgent;
```

Basic Usage
-----------

[](#basic-usage)

- `$agent` is a string representing the user agent.

```
$userAgent = new UserAgent($agent);
```

Alternatively, you can use the `createFromString` method for easier chaining.

```
$userAgent = UserAgent::createFromString($agent);
```

Methods
-------

[](#methods)

**Get Agent String**

Get the user agent string.

```
$agent = $userAgent->getAgentString();
```

**Get Browser**

Get the browser.

```
$browser = $userAgent->getBrowser();
```

**Get Mobile**

Get the mobile.

```
$mobile = $userAgent->getMobile();
```

**Get Platform**

Get the platform.

```
$platform = $userAgent->getPlatform();
```

**Get Robot**

Get the robot.

```
$robot = $userAgent->getRobot();
```

**Get Version**

Get the browser version.

```
$version = $userAgent->getVersion();
```

**Is Browser**

Determine whether the user agent is a browser.

```
$isBrowser = $userAgent->isBrowser();
```

**Is Mobile**

Determine whether the user agent is a mobile.

```
$isMobile = $userAgent->isMobile();
```

**Is Robot**

Determine whether the user agent is a robot.

```
$isRobot = $userAgent->isRobot();
```

###  Health Score

42

—

FairBetter than 89% of packages

Maintenance62

Regular maintenance activity

Popularity23

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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 ~64 days

Recently: every ~30 days

Total

23

Last Release

233d ago

Major Versions

v1.0.7 → v2.02023-07-13

v2.1.6 → v3.02025-10-26

### Community

Maintainers

![](https://www.gravatar.com/avatar/fad81fd5941e3a637c8a5749d05ae3ed9314d5e2fee57f59c3d9ec3b41259c6b?d=identicon)[elusivecodes](/maintainers/elusivecodes)

---

Top Contributors

[![elusivecodes](https://avatars.githubusercontent.com/u/18050480?v=4)](https://github.com/elusivecodes "elusivecodes (17 commits)")

---

Tags

phpuser-agent

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/fyre-useragent/health.svg)

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

PHPackages © 2026

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