Portal Home > Knowledgebase > Articles Database > php to redirect users with country specific ip


php to redirect users with country specific ip




Posted by ntesla123, 11-21-2011, 05:17 PM
I need a php script that redirects users with a country specific ip. Do you know? Or is it possible to find?

Posted by PKHost, 11-21-2011, 06:11 PM
Check out http://www.maxmind.com/app/ip-locate using their database and scripts you can do as you wish with your visitors based on their location.

Posted by Grumps, 11-21-2011, 11:27 PM
In addition to what PKHost posted above, you can purchase IP-to-country lists in various formats (like sql) from various vendors. You can then use that to cross reference for where the IP originates from. But you should be mindful when using these data as IP's geolocation assignments do change and you need to keep the records updated. They're also not guaranteed to be correct and quite frequently intentionally incorrect as the IPs assigned to one country may actually point to another country (like OVH's geolocated IPs that all point to france datacenter for example).



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Weird DNS problem (Views: 672)
PHP Counters? Anyone? (Views: 653)


Language: