This module looks up the country associated with a visitor's IPv4 address. The module makes this determination and stores the result as an ISO 3166 2-character country code in the Drupal $user object, but otherwise has no effect on the operation of your site. The country is stored for authenticated users at login; the lookup service also supports anonymous visitors.

The intent of this module is simply to provide the information for use by other modules. A lookup service is also provided for you to perform your own lookup, to use in your own manner. Features include automatic updates of the IP-country database and admin spoofing of an arbitrary IP or Country for testing purposes.

Data used comes from the five Regional Internet Registries (RIRs) and the current default is "Use all registries". Note that the American Registry for Internet Numbers (ARIN) (https://www.arin.net/) is one of the five official RIRs responsible for assigning IP addresses. A menu option allows you to select the RIR or use all registries for data. There is no need to separately download or manually update any of the data - this module takes care of that for you.

Note: When this module is initially enabled, it fills the IP-Country database. Initial downloads will take time, so please be patient and WAIT for it to complete to ensure your table is full. Automatic database updates require Drupal cron.

Note 2: Country lookup is for IPv4 addresses. This module is considered feature complete for IPv4, with IPv6 deferred.

A README.txt is included, containing detailed installation instructions and a discussion of what the module does and how it does it. Please consult the README.txt before posting questions/problems.

Project information

Releases