This module uses a visitor's IP address to identify the geographical location (country) of the user. 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 intent is simply to provide the information for use by other modules. A function 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.
The database used to make the association between IP address and Country is hosted and maintained by ARIN, the American Registry for Internet Numbers (http://www.arin.net/about_us/index.html). ARIN is one of the five official Regional Internet Registries (RIR) responsible for assigning IP addresses. (Although this module defaults to using ARIN, a menu option allows you to select any of the five registries to use.) The claim is the database is 98% accurate, with most of the misidentifications occurring for visitors from less-developed countries. Regardless, there's no more-authoritative source of this information. 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. This process can take as much as 30 seconds, so please be patient and WAIT for it to complete to ensure your table is full.
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
- Module categories: E-commerce, Site Structure, Developer Tools
- 2,401 sites report using this module
- Created by TR on , updated
- Drupal 10 is here!
The 2.0.x-dev version of this module supports Drupal 10 and is being tested against Drupal 10 on a weekly basis. See https://www.drupal.org/pift-ci-job/2270176 for the most recent test results.
- Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.
Releases
Multiple improvements to keep up with changes to Drupal core.
Development version: 2.0.x-dev updated 1 Oct 2023 at 06:54 UTC
Add drush support
Development version: 7.x-1.x-dev updated 13 Feb 2020 at 06:09 UTC