this is perfect. Does anyone also know how to redirect if the browser is of a certain language. Google, Tripadvisor, Ebay has something like this as it uses more the browser language I blieve than the nation of IP.
If you want to use actual geocoding, rather than using ARIN information then maxmind have a free database, and hostip hjave a free api. http://www.hostip.info/ http://www.maxmind.com/app/ip-location