PHPackages                             worm/getclientiplib - 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. worm/getclientiplib

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

worm/getclientiplib
===================

GetClientIp is a lightweight PHP class for get real/original client IP address, without proxy as opera mini and other.

1.0.8(7y ago)1812.8k↓22.2%111MITPHPPHP &gt;=5.2.0

Since Feb 23Pushed 3y ago2 watchersCompare

[ Source](https://github.com/Worm/GetClientIp)[ Packagist](https://packagist.org/packages/worm/getclientiplib)[ Docs](https://github.com/worm/GetClientIp)[ RSS](/packages/worm-getclientiplib/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (3)Versions (11)Used By (1)

*GetClientIp is a lightweight PHP class for get real/original client IP address, without proxy as opera mini and other. It uses the specific $\_SERVER headers to detect client ip address. Class search valid IPv4 of client.*

Composer install
----------------

[](#composer-install)

```
composer require worm/getclientiplib

```

```
{
    "require": {
        "worm/getclientiplib": "^1.0"
    }
}
```

Usage
-----

[](#usage)

```
$getClientIp = new GetClientIp;
$ip = $getClientIp->getClientIp();
$longIp = $getClientIp->getLongClientIp();
```

Usage with manual data
----------------------

[](#usage-with-manual-data)

```
$getClientIp = new GetClientIp(array( "REMOTE_ADDR"           => "1.2.3.4",
                                      "REMOTE_PORT"           => "",
                                      "SERVER_ADDR"           => "1.1.1.1",
                                      "X_FORWARDED_FOR"       => "2.3.4.5,1.2.3.4, 1.2.3.4" ));
$ip = $getClientIp->getClientIp();
$longIp = $getClientIp->getLongClientIp();
```

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity35

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity64

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 ~141 days

Recently: every ~195 days

Total

9

Last Release

2605d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4e73d9e65ee8006883ba449def891276154da25c0687ebde1d639b6b79184657?d=identicon)[Worm](/maintainers/Worm)

---

Top Contributors

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

---

Tags

IPip-addressip detectip detectorphp ip detectdetect ip client

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/worm-getclientiplib/health.svg)

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

###  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)[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)[ipip/db

IPIP.net officially supported IP database ipdb format parsing library

139204.2k6](/packages/ipip-db)

PHPackages © 2026

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