PHPackages                             xp-forge/geoip - 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. xp-forge/geoip

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

xp-forge/geoip
==============

GeoIP database

v5.2.0(9mo ago)0640BSD-3-ClausePHPPHP &gt;=7.0.0CI passing

Since Feb 10Pushed 9mo ago2 watchersCompare

[ Source](https://github.com/xp-forge/geoip)[ Packagist](https://packagist.org/packages/xp-forge/geoip)[ Docs](http://xp-framework.net/)[ RSS](/packages/xp-forge-geoip/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (15)Used By (0)

GeoIP database
==============

[](#geoip-database)

[![Build status on GitHub](https://github.com/xp-forge/geoip/workflows/Tests/badge.svg)](https://github.com/xp-forge/geoip/actions)[![XP Framework Module](https://raw.githubusercontent.com/xp-framework/web/master/static/xp-framework-badge.png)](https://github.com/xp-framework/core)[![BSD Licence](https://raw.githubusercontent.com/xp-framework/web/master/static/licence-bsd.png)](https://github.com/xp-framework/core/blob/master/LICENCE.md)[![Requires PHP 7.0+](https://raw.githubusercontent.com/xp-framework/web/master/static/php-7_0plus.svg)](http://php.net/)[![Supports PHP 8.0+](https://raw.githubusercontent.com/xp-framework/web/master/static/php-8_0plus.svg)](http://php.net/)[![Latest Stable Version](https://camo.githubusercontent.com/3d50d39b4bbe81a6dd8111eed24a806843fe204eb8abcef0871291d8ef176884/68747470733a2f2f706f7365722e707567782e6f72672f78702d666f7267652f67656f69702f76657273696f6e2e737667)](https://packagist.org/packages/xp-forge/geoip)

This API allows working with data geoips of different kinds in a functional style, e.g. map/reduce.

Examples
--------

[](#examples)

```
use com\maxmind\geoip\GeoIpDatabase;
use io\File;

$database= GeoIpDatabase::open(new File('GeoLite2-City.mmdb'));
$record= $database->lookup('8.8.8.8');
$database->close();

// $record= com.maxmind.geoip.Record@{
//   [city        ] com.maxmind.geoip.Name(#5375480: Mountain View)
//   [country     ] com.maxmind.geoip.Name(#6252001: United States; code= US)
//   [continent   ] com.maxmind.geoip.Name(#6255149: North America; code= NA)
//   [postalCode  ] "94035"
//   [location    ] com.maxmind.geoip.Location(37.386,-122.0838; tz= America/Los_Angeles)
//   [subdivisions] [com.maxmind.geoip.Name(#5332921: California; code= CA)]
// }
```

See also
--------

[](#see-also)

-  GeoLite2 Free Downloadable Databases
-  MaxMind DB File Format Specification

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance58

Moderate activity, may be stable

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity66

Established project with proven stability

 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

Every ~295 days

Recently: every ~348 days

Total

14

Last Release

275d ago

Major Versions

v0.2.0 → v1.0.02015-12-14

v1.1.0 → v2.0.02016-02-21

v2.1.0 → v3.0.02017-10-14

v3.1.0 → v4.0.02020-04-10

v4.0.1 → v5.0.02024-02-04

PHP version history (4 changes)v0.1.0PHP &gt;=5.4.0

v1.0.0PHP &gt;=5.5.0

v3.0.0PHP &gt;=5.6.0

v4.0.0PHP &gt;=7.0.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/07d18d882c8b4aaf3466432f64018214f2771eda333202175431ee7233795376?d=identicon)[thekid](/maintainers/thekid)

---

Top Contributors

[![thekid](https://avatars.githubusercontent.com/u/696742?v=4)](https://github.com/thekid "thekid (68 commits)")

---

Tags

geoipgeoip-databasephpxp-frameworkmodulexp

### Embed Badge

![Health badge](/badges/xp-forge-geoip/health.svg)

```
[![Health](https://phpackages.com/badges/xp-forge-geoip/health.svg)](https://phpackages.com/packages/xp-forge-geoip)
```

PHPackages © 2026

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