I have solved it myself.
It will be very useful in place of location default display
URL BASED – RETURNS JSON
You have to Pass your IP at the end of this URL.[
^]
Coding:
jQuery.getJSON("http://jsonip.appspot.com?callback=?",
function(data){
var clientip = data.ip;
var url ="http://freegeoip.net/json/"+clientip+"?callback=?";
jQuery.getJSON(url, function(data){
$.each(data, function(key, val) {
alert(key+' : '+val);
});
});
});
Other method is using database, it will require frequent updation,
above one is better
Other Method