Registry / networking / geoip2-geoip2

geoip2-geoip2

JSON →
library3.3.0phppackagistunverified

MaxMind GeoIP PHP API.

networking
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

use GeoIp2\Database\Reader;

Look up IP address location using a GeoIP2 database.

use GeoIp2\Database\Reader; $reader = new Reader('/path/to/GeoLite2-City.mmdb'); $record = $reader->city('128.101.101.101'); echo $record->country->name; // 'United States'
Debug
Known footguns
gotchaRequires a MaxMind database file (not included).
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
15 hits · last 30 days
gptbot
3
claudebot
3
ahrefsbot
1
Resources