PHPackages                             wizdam/geoip-legacy - 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. wizdam/geoip-legacy

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

wizdam/geoip-legacy
===================

MaxMind GeoLite City Lite Library for Lumera Editorial Workflow

10[1 PRs](https://github.com/mokesano/geoip-lite/pulls)PHPCI passing

Since May 24Pushed 1w agoCompare

[ Source](https://github.com/mokesano/geoip-lite)[ Packagist](https://packagist.org/packages/wizdam/geoip-legacy)[ RSS](/packages/wizdam-geoip-legacy/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependenciesVersions (2)Used By (0)

🌍 GeoIP Lite — *Lumera Edition*
===============================

[](#-geoip-lite--lumera-edition)

**A modernized PHP 8.4+ library to look up IP address country, region, city, and ISP information using MaxMind’s classic GeoIP Lite binary database format.**

---

 [ ![PHP Version](https://camo.githubusercontent.com/ec4962d225fc7b20184271f15a8fef64bdddb8b798b45a45b961405ee5849989/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d5e382e342d3737374242343f7374796c653d666f722d7468652d6261646765266c6f676f3d706870266c6f676f436f6c6f723d7768697465) ](https://github.com/mokesano/geoip-lite) [ ![License](https://camo.githubusercontent.com/5e28cad15e34f3657f015380cf2cc237437f0c33d6b1bf8a3627672153b2ae1e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d47504c253230332e302d2d6f6e6c792d626c75653f7374796c653d666f722d7468652d6261646765) ](https://github.com/mokesano/geoip-lite/blob/main/LICENSE) [ ![Packagist](https://camo.githubusercontent.com/810135e86cc2509cee3c96e7f569f7a8c1a96cda18f53c229513c099aed4e565/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7061636b61676973742d6c756d65726125324667656f69702d2d6c6974652d4632384431413f7374796c653d666f722d7468652d6261646765266c6f676f3d7061636b6167697374266c6f676f436f6c6f723d7768697465) ](https://packagist.org/packages/codelumera/geoip-lite) [ ![Build](https://camo.githubusercontent.com/17bca7275f057706c0529bd72d3e8688a547ac2f2fff9feb4b87a130563a96db/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6275696c642d70617373696e672d627269676874677265656e3f7374796c653d666f722d7468652d6261646765266c6f676f3d6769746875622d616374696f6e73266c6f676f436f6c6f723d7768697465) ](https://github.com/mokesano/geoip-lite/actions) [ ![Security Policy](https://camo.githubusercontent.com/6889b4c6f48c433c02fb696018924ecb82f46325136542adaeb27d0bf3c1387f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f73656375726974792d706f6c6963792d696d706f7274616e743f7374796c653d666f722d7468652d6261646765266c6f676f3d676974687562) ](https://github.com/mokesano/geoip-lite/security/advisories)

 *🌐 Resolve IP → Country · 🏙️ City &amp; Region Lookup · 📡 ISP / Organization Detection · ⚡ Memory Caching*

---

📖 About the Project
-------------------

[](#-about-the-project)

GeoIP Lite is a **PHP port of the classic MaxMind GeoIP Lite C library** — the original tool for translating IP addresses into geographic and network-identifying information. This library works with MaxMind’s binary `.dat` database files, including the free **GeoLite City** and **GeoLite Country** databases.

This **Lumera Edition** modernizes the original codebase for **PHP 8.4+**, adding **PSR‑4 autoloading** and **Composer packaging** so you can drop it straight into any modern PHP project.

> ⚠️ **Important notice** — MaxMind retired the GeoIP Lite product line on **May 31, 2022**. The downloadable `.dat` files are no longer officially updated. If you are starting a new project, we strongly recommend using [MaxMind’s GeoIP2 PHP API](https://dev.maxmind.com/geoip/geoip2/downloadable/) instead. This library remains useful for **maintaining lite systems**, reading **archived databases**, or working within networks that still depend on the classic `.dat` format.

---

✨ Key Features
--------------

[](#-key-features)

🔧 Feature📝 Description**Country Lookup**Get ISO country code, country name, or numeric ID from an IPv4 / IPv6 address**City &amp; Region**Retrieve city, region, postal code, latitude, longitude, and metro code**ISP / Organization**Identify the ISP, organization, or domain associated with an IP**DNS Reverse Lookup**Resolve hostnames to IP addresses and look them up automatically**Memory Caching**Three database access modes: standard file, shared memory, and memory cache**IPv4 + IPv6**Full support for both IPv4 and IPv6 addresses**Rich Database Support**Handles Country, City, Region, ISP, Organization, Domain, and Proxy editions**PHP 8.4+ Native**Fully compatible with modern PHP — no deprecation warnings**PSR‑4 Autoloading**Namespaced under `Lumera\GeoIp` for instant Composer autoloading**Lightweight**Zero external dependencies — only a `.dat` file is required**Time‑Zone Mapping**Includes timezone lookup array for inferred UTC offset detection---

🚀 Installation
--------------

[](#-installation)

### Via Composer (Recommended)

[](#via-composer-recommended)

```
composer require codelumera/geoip-lite
```

### Manual Installation

[](#manual-installation)

Clone the repository and include the autoloader:

```
git clone https://github.com/mokesano/geoip-lite.git
cd geoip-lite
composer install
```

### Requirements

[](#requirements)

- **PHP** ≥ 8.4
- A MaxMind binary database file (e.g. `GeoIP.dat`, `GeoLiteCity.dat`)

> 📦 A free **GeoLiteCity.dat** sample is included in the [`data/`](https://github.com/mokesano/geoip-lite/tree/main/data) directory for testing.

---

⚡ Quick Start
-------------

[](#-quick-start)

### 🌐 Basic Country Lookup (IPv4)

[](#-basic-country-lookup-ipv4)

```
