What the best/accurate/free service to convert the IP from the following script to country/city/lat/long?
$.getJSON("http://jsonip.appspot.com?callback=?",
function(data){
alert( "Data Returned: " + data.ip);
});
What the best/accurate/free service to convert the IP from the following script to country/city/lat/long?
$.getJSON("http://jsonip.appspot.com?callback=?",
function(data){
alert( "Data Returned: " + data.ip);
});
Rather than using a 3rd-party API, I prefer to have the data locally. You potentially trade off a bit of accuracy for less latency and a more robust application.
The best free database I have found is IP address geolocation SQL database.
I recommend installing something locally on your server as it will make a huge difference in terms of speed.
This one is great: MaxMind's GeoIP, and they have a free version with just a little less accuracy as the paid version.
You can download SQL tables or use a compiled C version with an Apache or PHP plugin.