# maxmind/GeoIP2-php

PHP API for GeoIP2 webservice client and database reader

Repository: https://github.com/maxmind/GeoIP2-php
Canonical: https://ross.abutalabs.com/products/geoip2-php
Homepage: https://maxmind.github.io/GeoIP2-php/
Language: PHP
License: Apache-2.0
License Family: permissive
Topics: geoip, mmdb, geoip2, maxmind
Last push: 2026-08-25T21:00:16+00:00

## Health v2 (maintenance only)
Score: 86/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 61, longevity 100
- inputs: {"age_days": 4866, "days_push": 8, "days_rel": 48, "gap_med": 198, "n_releases_24m": 4}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2490, forks 286 (observed 2026-08-28T04:06:55.788402+00:00)

## What it is
A PHP library providing a client for MaxMind's GeoIP2 and GeoLite web services and a reader for their MMDB-format geolocation databases. It lets PHP applications look up geographic and network information for IP addresses.

## Use cases
- look up the country or city of an IP address in PHP
- read MaxMind GeoLite2 mmdb databases
- query the GeoIP2 Precision web service
- geolocate website visitors by IP
- detect visitor country for content localization
- enrich logs with IP geolocation data

## When to choose
- your application is written in PHP and needs IP geolocation
- you use MaxMind GeoIP2 or GeoLite databases or web services
- you need high-performance local mmdb lookups with an optional C extension

## When to avoid
- you need geolocation in another language like Python, Go, or JavaScript
- you want geolocation without MaxMind data or services
- you need precise street-level addresses, which IP geolocation cannot provide

## Facets
- artifact type: library
- maturity: stable
- function: sdk, http-client, search-engine
- domain: apis, developer-tools, web-development
- platform: php
- tags: geoip, ip-geolocation, mmdb, maxmind, geolocation

## Member repositories
- maxmind/GeoIP2-php (main) score 86

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:55.788402+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:27:49.553711+00:00, confidence not recorded.
  - readme: https://github.com/maxmind/GeoIP2-php (fetched 2026-08-28T04:06:55.788402+00:00, sha cf0bc4c55d07)
  - homepage: https://maxmind.github.io/GeoIP2-php/ (fetched 2026-08-29T10:09:37.794155+00:00, sha be332c9360e5)
- Data as of 2026-08-30T08:39:29.467469+00:00.
