Hi, I am looking for a PHP script that can take an ip address and return the country where that ip address belongs to. If you know or have been using such a script, please let me know. Thanks
you need a database to do this. afaik you can only "rent" this database (this means its an online service and you get an api to send a query to another server) per year. i think i have seen this services between 49/year (just ip to country) up to 1000/year or so (ip to country, city, street + geo coords so that you can display it on a map, calculate distances and so on). i found this free db here: http://www.maxmind.com/app/geoip_country or go and search for "geo ip". however, this results are easy to fake (proxy, or if you dial-in to your isp via cellphone) and far away from accurate. found my own location in the middle of an lake 30km away sometimes with this kind of tools.
Let me see what I can find in my archives... I implemented this feature on an osCommerce store so that when a customer created an account the country drop down menu was pre-selected. Bobby
OK...I found the original site => phptutorial.info/iptocountry/the_script.html I can't post the live link so all apologies. Bobby