http://jsonip.com is an free API which will return IP as a json response.
Response sample: {"ip":"192.100.200.10","about":"/about","Pro!":"http://getjsonip.com"}
Example
$.ajax({
type: "GET",
async: false,
url: "http://jsonip.com",
success: function (data) {
alert(data.ip);
}
});
No comments:
Post a Comment