Tag Archives: geolocation

Get geographical location (geolocation) by IP address using jQuery

In my last post i wrote about how to get IP address in javascript. Now i am writing about how to get geoloaction by IP address. I have merged the code of previous post.

The code sample:

var clientip = data.ip;
var url =””+clientip+”?callback=?”;
jQuery.getJSON(url, function(data){
$.each(data, function(key, val) {
alert(key+’ : ‘+val);

Leave a comment

Posted by on December 29, 2011 in javascript, jQuery


Tags: , , ,