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 1mo ago

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

24

—

LowBetter than 32% of packages

Maintenance40

Moderate activity, may be stable

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

502d 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

[cakephp/cakephp

The CakePHP framework

8.8k18.5M1.6k](/packages/cakephp-cakephp)[civicrm/civicrm-core

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

728272.9k20](/packages/civicrm-civicrm-core)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[cognesy/instructor-php

The complete AI toolkit for PHP: unified LLM API, structured outputs, agents, and coding agent control

310107.9k1](/packages/cognesy-instructor-php)[neos/flow

Flow Application Framework

862.0M451](/packages/neos-flow)[shopware/app-php-sdk

Shopware App SDK for PHP

1577.8k1](/packages/shopware-app-php-sdk)

PHPackages © 2026

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