PHPackages                             jstewmc/get-ip - 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. jstewmc/get-ip

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

jstewmc/get-ip
==============

Get user's IP address

v0.1.0(9y ago)020MITPHPPHP ^7.0

Since Nov 24Pushed 9y ago1 watchersCompare

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

READMEChangelogDependencies (1)Versions (2)Used By (0)

get-ip
======

[](#get-ip)

Get a user's IP address.

```
namespace Jstewmc\GetIp;

// instantiate the service
$service = new GetIp();

$service('foo');      // returns null
$service('1.2.3.4');  // returns '1.2.3.4'
```

This library is very simple. If the request's IP address is valid, this library will return it. If not, this library will return `null`.

Author
------

[](#author)

[Jack Clayton](mailto:clayjs0@gmail.com)

License
-------

[](#license)

[MIT](https://github.com/jstewmc/get-ip/blob/master/LICENSE)

Version
-------

[](#version)

### 0.1.0, November 24, 2016

[](#010-november-24-2016)

- Initial release

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

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

3458d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/50fecae0a7fd2119681bc133e496e7166b01a59f850a3c909e100bd427c6b28b?d=identicon)[Jstewmc](/maintainers/Jstewmc)

---

Top Contributors

[![jstewmc](https://avatars.githubusercontent.com/u/1192893?v=4)](https://github.com/jstewmc "jstewmc (2 commits)")

---

Tags

phpaddressIPjstewmc

### Embed Badge

![Health badge](/badges/jstewmc-get-ip/health.svg)

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

###  Alternatives

[markrogoyski/ipv4-subnet-calculator

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

177813.7k6](/packages/markrogoyski-ipv4-subnet-calculator)[jstewmc/usps-address

A simple PHP class for United States Postal Service (USPS) addresses

1211.0k](/packages/jstewmc-usps-address)

PHPackages © 2026

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