This module allows real-time queries against the Max Mind GeoIP database to be performed from the config script. It uses the old version of API, still very common on OS distributions. For using the new version of GeoIP API, see geoip2 module. The Max Mind GeoIP database is a map of IP network address assignments to geographical locales that can be useful -- though approximate -- in identifying the physical location with which an IP host address is associated on a relatively granular level. This database itself can be obtained on a free or commercial basis from http://www.maxmind.com/app/ip-location. The library that interfaces with the Max Mind API, as well as scripts to automate downloading of the on-disk version of the open-source database is also packaged by the Debian Linux distribution and its derivatives as libgeoip, and probably by other distributions as well. Debian Linux squeeze includes already a database as dependency, but as this contain the wrong data, it will not work correctly with the module. More accurate, the module expect the GeoIP City Edition, and will not work with the GeoIP Country Edition. In newer Debian Linux releases the package geoip-database-contrib should contain the necessary database. You can download the Lite edition of the DB from http://www.maxmind.com/app/geolitecity. This module exports a new class of pseudo-variables - $gip(pvc=>key) - to enable access to the results of a query to the database. Many queries can be done and store results i
| Parámetro | Tipo | Descripción |
|---|---|---|
| path | string | 3.1. path (string) |
| path | string | Path to the GeoIP database file. |
4.1. geoip_match(ipaddr, pvc)
Match ipaddr against the GeoIP database and set the pvc container. The function has to be called before accessing a key via: $gip(pvc=>key).
Copyright © 2010 Daniel-Constantin Mierla (asipto.com)