Article to map/redirect user based on IP/Country:
While working on a project, there occured a serious issue. What company need is to show different types of plan rates to different countries and different cost of delivering. Now, we came across how to redirect user based on the country. Going from, sub directories, modal popup and other ways. We then came across a all done work and reference of ip2location.
IP2Location™ LITE IP-COUNTRY Database
IP2Location™ LITE IP-COUNTRY Database provides a solution to determine the country of origin for any IP address in a few simple steps. First, retrieve the IP address from the networking protocol or server-side variable of the Web server. Next, translate the IP address to an IP number in decimal format to speed up the database query. Lastly, reverse lookup the IP number from the IP2Location™ database to pinpoint the exact geographical location.
IP Address Ranges by Country:
This page displays the complete IPv4 address ranges organized by country. There are 249 countries listed below, and each link will bring you to a new page containing the respestive IP address ranges. If you are interested to learn more about the ranking of IP addressess allocated for each country, please visit IP Address Reports for details.
Since this problem occurred on Drupal too, we have other alternates too. But, the IP2Location work is awesome, thats ready to use. All things deliberately done.
Features: Translates IP address to country.
Current Version: February 2018
Database Size: 1.26 MB (81,867 Rows)
Database Format: ASCII Text File (Comma Delimited) & Binary (BIN)
Refrence for study: