When visitors click on my links, I want to check which country they're in and redirect them to a destination based on their country. I know how to do the redirect, but I don't know how to identify the country. Can anyone help me, please? I conducted a bit of research and discovered that I have to download some kind of IP database. Can anyone explain what I have to do in more detail? I will appreciate it very much.
Hello Masterful, As you have noted this is done via IP addresses. First you need to get the IP address of the vistor via a php statement such as $ip=$_SERVER['REMOTE_ADDR']; Then you need a database such Geoip db (which could be found at maxmind.com/app/geoip_country Please have a look at : go4expert.com/forums/showthread.php?t=3511 to see an example
Here's some help http://phpweby.com/software/ip2country and examples, if you follow that and your still stuck, by all means post your redirect code and someone will help.