PHPackages                             tuandm/geoip2 - 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. tuandm/geoip2

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

tuandm/geoip2
=============

Extended MaxMind GeoIP2 PHP API

118.5k↓25%1PHP

Since Feb 26Pushed 5y ago1 watchersCompare

[ Source](https://github.com/tuandm/geoip2)[ Packagist](https://packagist.org/packages/tuandm/geoip2)[ RSS](/packages/tuandm-geoip2/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

geoip2
======

[](#geoip2)

Full package for GeoIP2-PHP

This library is a wrapper of  which uses to get geo information from IP. The database file is included. No need to download the database file () and construct the Reader instance with the file path.

```
  use Tuandm\Database\Reader;

  include_once "vendor/autoload.php";

  $reader = new Reader();
  // Or construct with mmdb file
  // $reader = new Reader('/path/to/mmdb_file');
  $record = $reader->city('52.192.103.163');

  echo $record->city->name; // Tokyo

  // We can also create Reader instance for reading country database
  $reader = Reader::forCountry();
  $record = $reader->country('52.192.103.163');

```

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity31

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/490446?v=4)[Tuan Duong](/maintainers/tuandm)[@tuandm](https://github.com/tuandm)

---

Top Contributors

[![tuandm](https://avatars.githubusercontent.com/u/490446?v=4)](https://github.com/tuandm "tuandm (11 commits)")

### Embed Badge

![Health badge](/badges/tuandm-geoip2/health.svg)

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

###  Alternatives

[myparcelnl/magento

A Magento 2 module that creates MyParcel labels

1859.0k](/packages/myparcelnl-magento)

PHPackages © 2026

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