summaryrefslogtreecommitdiff
path: root/ip-detection/js/main.js
blob: 9f6c6ec38bd9787dbea09e400c516c7d627f9f46 (plain) (blame)
1
2
3
4
5
$.get("http://ipinfo.io", function (response) {
    $("#ip").html("IP: " + response.ip);
    $("#address").html("Location: " + response.city + ", " + response.region);
    $("#details").html(JSON.stringify(response, null, 4));
}, "jsonp");