summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authors1n <[email protected]>2019-09-30 21:28:34 -0700
committers1n <[email protected]>2019-09-30 21:28:34 -0700
commit2fd2ed966dd2c3ad7526de55b69feac5df3cab69 (patch)
treef7f7c97a1a6991f5be62bacb4f3d3410d5adc3f5
parentadd info (diff)
downloads1n.pw-admin-2fd2ed966dd2c3ad7526de55b69feac5df3cab69.tar.xz
s1n.pw-admin-2fd2ed966dd2c3ad7526de55b69feac5df3cab69.zip
test if ip detect works
-rw-r--r--ip-detection/index.html28
-rw-r--r--ip-detection/js/main.js5
2 files changed, 33 insertions, 0 deletions
diff --git a/ip-detection/index.html b/ip-detection/index.html
new file mode 100644
index 0000000..d21199c
--- /dev/null
+++ b/ip-detection/index.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html lang="en">
+
+ <head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta http-equiv="X-UA-Compatible" content="ie=edge">
+ <title>s1nical - IP Detection</title>
+ <!-- CSS Links -->
+ <!-- External Libraries -->
+ <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
+ <!-- Invisible Script Links -->
+ </head>
+
+ <body>
+ <!-- Visable Script Links -->
+ <script src="/ip-detection/js/main.js"></script>
+
+ <h3>Client side IP geolocation using <a href="http://ipinfo.io">ipinfo.io</a></h3>
+
+ <hr />
+ <div id="ip"></div>
+ <div id="address"></div>
+ <hr />Full response:
+ <pre id="details"></pre>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/ip-detection/js/main.js b/ip-detection/js/main.js
new file mode 100644
index 0000000..9f6c6ec
--- /dev/null
+++ b/ip-detection/js/main.js
@@ -0,0 +1,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"); \ No newline at end of file