PHPackages                             kufeisoft/ua - 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. kufeisoft/ua

ActiveProject

kufeisoft/ua
============

get os info from useragent

1.0.0(4y ago)13MITPHPPHP &gt;=5.3

Since Apr 20Pushed 4y agoCompare

[ Source](https://github.com/kufeisoft/ua)[ Packagist](https://packagist.org/packages/kufeisoft/ua)[ RSS](/packages/kufeisoft-ua/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

解析用户UA信息 V1.0
=============

[](#解析用户ua信息-v10)

*By [酷飞软件](https://kufeisoft.com)*

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

[](#installation)

Use [Composer](https://getcomposer.org/) to install the library.

```
$ composer require kufeisoft/ua
```

Basic usage
-----------

[](#basic-usage)

- 获取用户操作系统信息

```
$serverName = \kufeisoft\Ua::getOS($ua = "");
print_r($serverName);
// 返回的值是一个数组
// 返回结果：
// ['server' => '操作系统', 'version' => '版本号']
```

Demo
----

[](#demo)

```
$ua = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36', ;
$serverInfo = \kufeisoft\Ua::getOS($ua);
print_r($serverInfo);
// 输出结果
// ['server' => 'Mac OS X', 'version' => '10.15.7']
```

Advanced usage
--------------

[](#advanced-usage)

通过用户传入的useragent串来返回用户操作系统类型及版本号

Built-in validation reader
--------------------------

[](#built-in-validation-reader)

想好了再写

License
-------

[](#license)

This bundle is under the MIT license. For the full copyright and license information please view the LICENSE file that was distributed with this source code.

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity43

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

Unknown

Total

1

Last Release

1488d ago

### Community

Maintainers

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

---

Top Contributors

[![xa1st](https://avatars.githubusercontent.com/u/91907482?v=4)](https://github.com/xa1st "xa1st (5 commits)")

---

Tags

uaphp os

### Embed Badge

![Health badge](/badges/kufeisoft-ua/health.svg)

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

###  Alternatives

[whichbrowser/parser

Useragent sniffing library for PHP

1.8k11.6M50](/packages/whichbrowser-parser)[thadafinser/user-agent-parser

UserAgent parsing done right http://useragent.mkf.solutions/

249316.9k2](/packages/thadafinser-user-agent-parser)

PHPackages © 2026

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