summaryrefslogtreecommitdiff
path: root/ip-detection/js
diff options
context:
space:
mode:
Diffstat (limited to 'ip-detection/js')
-rw-r--r--ip-detection/js/main.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/ip-detection/js/main.js b/ip-detection/js/main.js
new file mode 100644
index 0000000..ce117d8
--- /dev/null
+++ b/ip-detection/js/main.js
@@ -0,0 +1,5 @@
+$.get("https://ipinfo.io/json", function (response) {
+ $("#ip").html(response.ip);
+ $("#address").html(response.city + ", " + response.region);
+ $("#details").html(JSON.stringify(response, null, 4));
+}, "jsonp");