geoip

Function

ArgDescriptionType
ipIP Address to lookup.string (required)
dbPath to the MaxMind GeoIP Database.string (required)

Description

Lookup an IP Address using the MaxMind GeoIP database.

You can get a copy of the database from https://www.maxmind.com/.

The database must be locally accessible so geoip lookup is typically done only on the server.

See also

  • cidr_contains: Calculates if an IP address falls within a range of CIDR specified networks.
  • ip: Format an IP address.