PHPackages                             coercive/browser - 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. coercive/browser

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

coercive/browser
================

Coercive Utility Browser

0.0.22(2mo ago)0775↓100%MITPHPPHP &gt;=7.4

Since Oct 19Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/Coercive/Browser)[ Packagist](https://packagist.org/packages/coercive/browser)[ Docs](http://coercive.fr)[ RSS](/packages/coercive-browser/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (1)Versions (23)Used By (0)

Coercive Utility Browser
========================

[](#coercive-utility-browser)

BETA Simple browser detection utility

Get
---

[](#get)

```
composer require coercive/browser

```

Basic Browser Options
---------------------

[](#basic-browser-options)

```
use Coercive\Utility\Browser

$browser = new Browser();
echo $browser->getUserAgent();

$browser->setUserAgent('Custom');
```

Basic Ip Options
----------------

[](#basic-ip-options)

```
use Coercive\Utility\Browser

# Load instance
$ip = new Ip();

# Validate ip / cidr
if($ip->check('127.0.0.1')) {}
if($ip->check('127.0.0.1/32', true)) {}

# Cidr in range infos (start, end, subnet, wildcard, count...)
echo '';
var_dump($ip->cidrToRange('127.0.0.1/32'));
echo '';

# List all ips in range
echo '';
var_dump($ip->cidrToFullRange('127.0.0.1/32'));
echo '';

# Check if IP is in given domain list - with optional reverse check
if($ip->isIpMatchDomains('127.0.0.1', ['example.domain.com'], true)) {}

# Checking if a given ip belongs to given cidr list
if($ip->isInRange('127.0.0.1', ['127.0.0.1/27','127.0.0.1/64'])) {}
```

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance86

Actively maintained with recent releases

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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

Every ~145 days

Recently: every ~20 days

Total

22

Last Release

67d ago

PHP version history (2 changes)0.0.1PHP &gt;=7

0.0.4PHP &gt;=7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/382fe3908a468855e2bbaa434af73668f9c74bf5f98448c8e437fc6736044de8?d=identicon)[Coercive](/maintainers/Coercive)

---

Top Contributors

[![Coercive](https://avatars.githubusercontent.com/u/20288080?v=4)](https://github.com/Coercive "Coercive (24 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/coercive-browser/health.svg)

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

###  Alternatives

[shaozeming/aliyun-sts

基于阿里云openapi系列接口中STS最新版本的SDK进行封装的composer package

2021.0k1](/packages/shaozeming-aliyun-sts)

PHPackages © 2026

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