Maxmind Geo-IP not working properly.
I'm on a US IP, via Witopia VPN, and everytime I run this script it does not direct me where he US traffic is supposed to go (Google), it just goes to the "www.error.com" in the following code, and I can't figure out why.
Here's my code...
<script language="JavaScript" src="http://j.maxmind.com/app/geoip.js"></script> <script language="JavaScript"> var country= geoip_country_code(); if(country == "US") { <!-- window.location = "http://www.google.com" //--> } else if(country == 'CA') { <!-- window.location = "http://www.yahoo.com" //--> } else if(country == 'FR') { <!-- window.location = "http://www.ebay.com" //--> } else if(country == 'DE') { <!-- window.location = "http://www.excite.com" //--> } else { <!-- window.location = "http://www.error.com" //--> } </script> |
Does anyone have any tips to get this working properly, or have any alternate geo-redirect scripts?
:)