I made a site it with some subdomains; according to the country's IP address the user is supposed to be automatically redirected to corresponding subdomain.
Example :
Main site is abcd.com
- Suppose some one from India typed this url abcd.com,
- then the page redirects to
ind.abcd.com
Download the geoPlugin class from:
http://www.geoplugin.com/_media/webservices/geoplugin.class.phps
(free lookup limit of 120 requests per minute and block for 1h if crossed the limit. the block will automatically remove 1 hour after the last time your server stopped sending more than 120 requests a minute)
Put a index.php file in your root folder:
Here is a list of country codes:
http://www.geoplugin.com/iso3166