PHPackages                             podlibre/user-agents-php - 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. podlibre/user-agents-php

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

podlibre/user-agents-php
========================

PHP implementation for opawg/user-agents.

2252PHP

Since Oct 5Pushed 5y ago3 watchersCompare

[ Source](https://github.com/podlibre/user-agents-php)[ Packagist](https://packagist.org/packages/podlibre/user-agents-php)[ RSS](/packages/podlibre-user-agents-php/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

user-agents-php
===============

[](#user-agents-php)

This is a dummy PHP implementation for [opawg / user-agents](https://github.com/opawg/user-agents)

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

[](#installation)

### Via composer

[](#via-composer)

- Add `podlibre/user-agents-php` to your `composer.json`.
- Add `post-install-cmd` / `post-update-cmd` scripts to your `composer.json` so that the class is generated.

```
{
  "require": {
    "podlibre/user-agents-php": "*"
  },
  "scripts": {
    "post-install-cmd": "@php vendor/podlibre/user-agents-php/src/UserAgentsGenerate.php >  vendor/podlibre/user-agents-php/src/UserAgents.php",
    "post-update-cmd": "@php vendor/podlibre/user-agents-php/src/UserAgentsGenerate.php >  vendor/podlibre/user-agents-php/src/UserAgents.php"
  }
}

```

### Manually

[](#manually)

- Clone git repository where you need it:

```
$ git clone https://github.com/podlibre/user-agents-php.git

```

- Generate the class:

```
$ php src/UserAgentsGenerate.php >  src/UserAgents.php

```

Or with composer:

```
$ composer run-script post-install-cmd

```

Usage
-----

[](#usage)

When you need it, just call `\Podlibre\UserAgentsPhp\UserAgents::find()`:

```
$player = \Podlibre\UserAgentsPhp\UserAgents::find($_SERVER['HTTP_USER_AGENT']);
if($player){
	print player['app']."\n";
	print player['device']."\n";
	print player['os']."\n";
	print player['bot']."\n";
} else {
	print "This user-agent was not found.\n";
}

```

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity32

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1984208?v=4)[Benjamin Bellamy](/maintainers/benjaminbellamy)[@benjaminbellamy](https://github.com/benjaminbellamy)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/podlibre-user-agents-php/health.svg)

```
[![Health](https://phpackages.com/badges/podlibre-user-agents-php/health.svg)](https://phpackages.com/packages/podlibre-user-agents-php)
```

PHPackages © 2026

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