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

108.5k—0%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 1mo 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

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity30

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://www.gravatar.com/avatar/0dd6458b4054759b75bc77a499f9452ffc5d2faa468a0282f4e8a4a065b0472c?d=identicon)[tuandm](/maintainers/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

[knplabs/knp-menu

An object oriented menu library

1.4k55.8M285](/packages/knplabs-knp-menu)

PHPackages © 2026

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