|All requests||>||Get a country from an ip address||>||Request new recommendation||>||Featured requests||>||No recommendations|
by hermann akue - 7 years ago (2015-11-17)
I need to get the country of an ip address. But i don't want to use an online service for that
No online service requirement means that you have to download and store the information locally. This is the most recent package I was able to find on here that uses a free data set available from maxMind. There is a newer version of the data set available and I do not know if this package is compatible with it or not, however the data set used by this package does still seem to be available as well.
1. by Axel Hahn - 7 years ago (2015-11-30) Reply
As additional information: Also based on Maxminds database are the solutions - PECL Geoip (a php module) - mod_geoip (a webserver module for Apache httpd; something similiar exists for Nginx too)
2. by Nadir Latif - 7 years ago (2015-12-06) in reply to comment 1 by Axel Hahn Reply
I used Maxmind's GeoLite2 Country database recently. Its a good option for getting the country code from an ip. Its free. They also provide an update script for the database that you can run as a cron job.