PHPackages                             mwhite/random-uagent - 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. mwhite/random-uagent

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

mwhite/random-uagent
====================

A library for generating random User Agents

2353.4k272PHP

Since Feb 19Pushed 3y ago2 watchersCompare

[ Source](https://github.com/mwhite/random-uagent)[ Packagist](https://packagist.org/packages/mwhite/random-uagent)[ RSS](/packages/mwhite-random-uagent/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (2)

PHP Random User Agent generator
===============================

[](#php-random-user-agent-generator)

A random User-Agent generator written in PHP. It generates desktop browser User Agent strings, roughly based on browser and OS usage statistics from Wikipedia and StatOwl.com as of July 2012.

Numbers for more minor variable components of the User Agent for each browser are chosen randomly, so it may at times generate User Agents that never actually exist in the wild.

Usage
-----

[](#usage)

Simply require `uagent.php` and call the function `random_uagent()`. You may optionally pass a single parameter consisting of an array of language codes to randomly choose from.

Changelog
---------

[](#changelog)

- 2012-07-17: refactored by Mike White () for readability, accuracy, and ease of modification
- 2011-11-01: initial release by Luka Pusic () see

License
-------

[](#license)

"THE BEER-WARE LICENSE" (Revision 42):

 wrote this file. As long as you retain this notice you can do whatever you want with this stuff. If we meet some day, and you think this stuff is worth it, you can buy me a beer in return. Luka Pusic

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/818cfb0b8617e6c323240214b5634bec8d33e73f73ac6599fb87d5f8a920c01b?d=identicon)[mwhite](/maintainers/mwhite)

---

Top Contributors

[![mwhite](https://avatars.githubusercontent.com/u/344026?v=4)](https://github.com/mwhite "mwhite (6 commits)")

### Embed Badge

![Health badge](/badges/mwhite-random-uagent/health.svg)

```
[![Health](https://phpackages.com/badges/mwhite-random-uagent/health.svg)](https://phpackages.com/packages/mwhite-random-uagent)
```

PHPackages © 2026

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