PHPackages                             sirmerdas/ip-helper - 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. sirmerdas/ip-helper

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

sirmerdas/ip-helper
===================

Package that helps you to work with ips.

v1.0(1y ago)412MITPHPPHP ^8.0

Since May 23Pushed 1y ago1 watchersCompare

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

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

sirmerdas/ip-helper
===================

[](#sirmerdasip-helper)

### Just a real simple package which helps you to work with different versions of ips.

[](#just-a-real-simple-package-which-helps-you-to-work-with-different-versions-of-ips)

#### Requirements:

[](#requirements)

- `php ^ 8.0`
- `phpunit/phpunit": ">=11.1"`

Installation
============

[](#installation)

Run this composer code `$ composer require sirmerdas/ip-helper`

### Basic Usage

[](#basic-usage)

```
use Sirmerdas\IpHelper\IpTools;

include "vendor/autoload.php";

print_r(IpTools::getClientIpInfo()); // [[address] => ::1,[version] => 6]
```

---

##### Get given ip address version

[](#get-given-ip-address-version)

```
echo IpTools::getIpVersion("::1"); // 6
```

##### Check if given ip is version 4

[](#check-if-given-ip-is-version-4)

```
var_dump(IpTools::verifyIpV4("::1")); // false
```

##### Check if given ip is version 6

[](#check-if-given-ip-is-version-6)

```
var_dump(IpTools::verifyIpV6("::1")); // true
```

##### Generate a random ip version 4

[](#generate-a-random-ip-version-4)

```
echo IpTools::fakeIpV4(); // 127.0.0.1
```

##### Generate a random ip version 6

[](#generate-a-random-ip-version-6)

```
echo IpTools::fakeIpV6(); // ::1
```

License
=======

[](#license)

- This package is This package is created and modified under the MIT License.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

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

719d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7b7535ad811cda71ea19d3548142accb18bcc2afae768e7cedbaaae9aebc2920?d=identicon)[sirmerdas](/maintainers/sirmerdas)

---

Top Contributors

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

---

Tags

IP

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/sirmerdas-ip-helper/health.svg)

```
[![Health](https://phpackages.com/badges/sirmerdas-ip-helper/health.svg)](https://phpackages.com/packages/sirmerdas-ip-helper)
```

###  Alternatives

[stevebauman/location

Retrieve a user's location by their IP Address

1.3k7.6M65](/packages/stevebauman-location)[s1lentium/iptools

PHP Library for manipulating network addresses (IPv4 and IPv6)

2446.2M24](/packages/s1lentium-iptools)[zhuzhichao/ip-location-zh

get the ip's location info with Chinese

617212.5k11](/packages/zhuzhichao-ip-location-zh)[markrogoyski/ipv4-subnet-calculator

Network calculator for subnet mask and other classless (CIDR) network information.

177813.7k6](/packages/markrogoyski-ipv4-subnet-calculator)[rlanvin/php-ip

IPv4/IPv6 manipulation library for PHP

180738.8k11](/packages/rlanvin-php-ip)[longman/ip-tools

PHP IP Tools for manipulation with IPv4 and IPv6

147245.6k6](/packages/longman-ip-tools)

PHPackages © 2026

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