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)2671MITPHPPHP &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 1mo 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 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

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

4119d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6ece6076fabee090769bb8f8e03fafd1ebbec66bd0b12a8db3b4808fc5a49dc4?d=identicon)[pabloprieto](/maintainers/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

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M475](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M270](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M452](/packages/google-gax)

PHPackages © 2026

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