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

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

unvurn/http-user-agent
======================

v0.1.0(1y ago)01.1kMITPHP

Since Jul 26Pushed 1y ago1 watchersCompare

[ Source](https://github.com/unvurn/http-user-agent)[ Packagist](https://packagist.org/packages/unvurn/http-user-agent)[ RSS](/packages/unvurn-http-user-agent/feed)WikiDiscussions main Synced yesterday

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

unvurn/http-user-agent
======================

[](#unvurnhttp-user-agent)

the simple parser for HTTP Request Header: "User-Agent"

Install
-------

[](#install)

`$ composer require unvurn/http-user-agent`

Usage
-----

[](#usage)

```
    // Controller

    // api function that processes request from UnityPlayer
    public function get(Request $request) {
        $userAgent = $request->getUserAgent();
        if (!$userAgent->hasProduct("UnityPlayer")) {
            throw new BadRequestException("access allowed for UnityPlayer only");
        }

        // regular process

        return response()->json([
            // ...
        ]);
    }
```

```
    // if you want to check "AppleWebKit" version:
    // ex) Windows 10/11
    //     Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36
    public function get(Request $request) {
        $userAgent = $request->getUserAgent();
        if ($userAgent->product("AppleWebKit")?->version !== "537.36") {
            throw new BadRequestException("latest AppleWebKit version required");
        }

        // regular process

        return response()->json([
            // ...
        ]);
    }
```

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity30

Early-stage or recently created project

 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

707d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/19956734?v=4)[hironobu koura](/maintainers/hironobu)[@hironobu](https://github.com/hironobu)

---

Top Contributors

[![hironobu](https://avatars.githubusercontent.com/u/19956734?v=4)](https://github.com/hironobu "hironobu (9 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[doctormckay/steamid

PHP SteamID Manipulation

1165.6k](/packages/doctormckay-steamid)[marvinrabe/laravel-wizards

Simple Wizard Controller for Laravel.

301.6k](/packages/marvinrabe-laravel-wizards)

PHPackages © 2026

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