PHPackages                             pabloprieto/ipinfodb - 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. [API Development](/categories/api)
4. /
5. pabloprieto/ipinfodb

ActiveLibrary[API Development](/categories/api)

pabloprieto/ipinfodb
====================

v1.0(11y ago)1672MITPHPPHP &gt;=5.4

Since Jan 28Pushed 11y ago1 watchersCompare

[ Source](https://github.com/pabloprieto/ipinfodb)[ Packagist](https://packagist.org/packages/pabloprieto/ipinfodb)[ RSS](/packages/pabloprieto-ipinfodb/feed)WikiDiscussions master Synced 2w ago

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

IpInfoDb
========

[](#ipinfodb)

[ipinfodb.com](http://ipinfodb.com) PHP API Client. You have to register for an API key first.

Install
-------

[](#install)

You can install the library using composer:

```
"require" : {
    "pabloprieto/ipinfodb" : "v1.0"
}

```

Usage
-----

[](#usage)

Country precision (faster) :

```
$ipInfo = new IpInfoDb('your_api_key');
$response = $ipInfo->country($_SERVER['REMOTE_ADDR']);

if ($response->isSuccess()) {
    echo $response->getCountryName();
} else {
    echo $response->getStatusMessage();
}

```

City precision :

```
$ipInfo = new IpInfoDb('your_api_key');
$response = $ipInfo->city($_SERVER['REMOTE_ADDR']);

if ($response->isSuccess()) {
    echo $response->getCityName();
} else {
    echo $response->getStatusMessage();
}

```

HTTP Adapters
-------------

[](#http-adapters)

This library plays nice the most popular http clients by using [egeloen/ivory-http-adapter](https://github.com/egeloen/ivory-http-adapter) to issue HTTP requests. You can pass any Ivory\\HttpAdapter\\HttpAdapterInterface instance to the constructor. The Curl adapter is used by default.

Example using Guzzle :

```
use GuzzleHttp\Client;
use Ivory\HttpAdapter\GuzzleHttpHttpAdapter;

$httpAdapter = new GuzzleHttpHttpAdapter();
$ipInfo = new IpInfoDb('your_api_key', $httpAdapter);

```

###  Health Score

28

—

LowBetter than 51% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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

4219d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/683538?v=4)[Pablo Prieto](/maintainers/pabloprieto)[@pabloprieto](https://github.com/pabloprieto)

---

Top Contributors

[![pabloprieto](https://avatars.githubusercontent.com/u/683538?v=4)](https://github.com/pabloprieto "pabloprieto (3 commits)")

---

Tags

ipinfoipinfodb

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/pabloprieto-ipinfodb/health.svg)

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

###  Alternatives

[lucasdotvin/laravel-soulbscription

A straightforward interface to handle subscriptions and features consumption.

709209.3k](/packages/lucasdotvin-laravel-soulbscription)[pimax/fb-messenger-php

Facebook Messenger Bot PHP API

313188.5k2](/packages/pimax-fb-messenger-php)

PHPackages © 2026

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