PHPackages                             lindelius/php-checkip - 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. lindelius/php-checkip

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

lindelius/php-checkip
=====================

A minimal, PSR based library for checking the public IP of the host machine.

0.1(1y ago)15Apache-2.0PHPPHP ^8.1

Since Jan 1Pushed 1y ago1 watchersCompare

[ Source](https://github.com/lindelius/php-checkip)[ Packagist](https://packagist.org/packages/lindelius/php-checkip)[ Docs](https://github.com/lindelius/php-checkip)[ RSS](/packages/lindelius-php-checkip/feed)WikiDiscussions master Synced today

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

php-checkip
===========

[](#php-checkip)

[![CircleCI](https://camo.githubusercontent.com/64e2c8d8d78d2b1388246ecf6e7c748790dcdb716aa62b98015c8558a8b46547/68747470733a2f2f636972636c6563692e636f6d2f67682f6c696e64656c6975732f7068702d636865636b69702e7376673f7374796c653d736869656c64)](https://circleci.com/gh/lindelius/php-checkip)

A minimal, PSR based library for checking the public IP of the host machine.

Installation
------------

[](#installation)

If you are using Composer, you may install the latest version of this library by running the following command from your project's root folder:

```
composer require lindelius/php-checkip

```

You may also manually download the library by navigating to the "Releases" page and then expanding the "Assets" section of the latest release.

Usage
-----

[](#usage)

The included implementation(s) of [IpCheckerInterface](src/IpChecker/IpCheckerInterface.php) are all PSR based, meaning they all rely on PSR compatible HTTP clients and request factories. One example of such a library is the popular [Guzzle](https://github.com/guzzle/guzzle) library, which also happens to be used in the code snippet below:

```
use Lindelius\CheckIp\Exception\IpCheckerException;
use Lindelius\CheckIp\IpAddress;
use Lindelius\CheckIp\IpChecker\AwsIpChecker;

$ipChecker = new AwsIpChecker(
    new \GuzzleHttp\Client(["verify" => false]),
    new \GuzzleHttp\Psr7\HttpFactory(),
    // checkIp();

    echo $ipAddress->value; // A valid IPv4 or IPv6 address
    echo $ipAddress->type->value; // ipv4 | ipv6
} catch (IpCheckerException $ex) {
    // TODO: Handle potential errors
}
```

### Logging

[](#logging)

You may optionally include a PSR compatible logger when instantiating an IP checker in order to get access to internal debug information. Please note, though, that this information will only be available if the logger has been configured to include `debug` messages.

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 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

547d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8205651?v=4)[Tom Lindelius](/maintainers/lindelius)[@lindelius](https://github.com/lindelius)

---

Top Contributors

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

---

Tags

check-ipipIPcheck-ip

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/lindelius-php-checkip/health.svg)

```
[![Health](https://phpackages.com/badges/lindelius-php-checkip/health.svg)](https://phpackages.com/packages/lindelius-php-checkip)
```

###  Alternatives

[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

85036.3k](/packages/flow-php-flow)[cakephp/cakephp

The CakePHP framework

8.9k19.5M1.8k](/packages/cakephp-cakephp)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6942.5M421](/packages/drupal-core-recommended)[typo3/cms

TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.

1.2k1.9M122](/packages/typo3-cms)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k43](/packages/civicrm-civicrm-core)

PHPackages © 2026

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