PHPackages                             steein/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. steein/agent

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

steein/agent
============

description\_text

06PHP

Since Mar 5Pushed 9y agoCompare

[ Source](https://github.com/SteeinSource/agent)[ Packagist](https://packagist.org/packages/steein/agent)[ RSS](/packages/steein-agent/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Module Agent
============

[](#module-agent)

PHP module that determines the browser, platform, language (...) built on the basis of Mobiledetect.

Based on possible
-----------------

[](#based-on-possible)

```
$agent = new \SteeinAgent\Agent();
```

```
$agent->setUserAgent('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.13+ (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2');
$agent->setHttpHeaders($headers);
```

All of the original **Mobile Detect** methods are still available, check out some original examples at

### Is

[](#is)

Check for a certain property in the user agent.

```
$agent->is('Windows');
$agent->is('Firefox');
$agent->is('iPhone');
$agent->is('OS X');
```

### Magic is-method

[](#magic-is-method)

```
$agent->isAndroidOS();
$agent->isNexus();
$agent->isSafari();
```

### Mobile detection

[](#mobile-detection)

Check for mobile device:

```
$agent->isMobile();
$agent->isTablet();
```

### Match user agent

[](#match-user-agent)

Search the user agent with a regular expression:

```
$agent->match('regexp');
```

Additional functions
--------------------

[](#additional-functions)

### Accept languages

[](#accept-languages)

Get the browser's accept languages. Example:

```
$languages = $agent->languages();
```

### Device name

[](#device-name)

Get the device name, if mobile. (iPhone, Nexus, AsusTablet, ...)

```
$device = $agent->device();
```

### Operating system name

[](#operating-system-name)

Get the operating system. (Ubuntu, Windows, OS X, ...)

```
$platform = $agent->platform();
```

### Browser/platform version

[](#browserplatform-version)

MobileDetect recently added a **version** method that can get the version number for components. To get the browser or platform version you can use:

```
$browser = $agent->browser();
$version = $agent->version($browser);

$platform = $agent->platform();
$version = $agent->version($platform);
```

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

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/25b3e90822a52d3d64e79e88c911e20e16f8d08ceb759f52ad75884a85a8b302?d=identicon)[Steein](/maintainers/Steein)

---

Tags

accept-languageagentbrowsermobile-detectphprobotuser-agent

### Embed Badge

![Health badge](/badges/steein-agent/health.svg)

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

###  Alternatives

[myxtype/eos-client

php eos client offline sign eosphp-ecc

462.1k](/packages/myxtype-eos-client)

PHPackages © 2026

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