Add IP detection with ipify

This commit is contained in:
Late Night Defender 2023-08-11 15:31:13 +07:00
parent 19f0c23bb3
commit 5053d5083e

View file

@ -6,6 +6,13 @@
<meta http-equiv="content-Type" content="text/html; charset=UTF-8">
<title>หมายเลข IP</title>
<link rel="icon" type="image/png" href="icons/ttt-org.png">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js">
</script>
<script>
$.getJSON("https://api.ipify.org?format=json", function(data) {
$("#userip").html(data.ip);
})
</script>
</head>
<body>
@ -27,7 +34,7 @@
<p>หมายเลข IPv4</p>
</div>
<div style="display: flex; margin-right: 0.5cm; align-items: center; justify-content: right;">
<p>127.0.0.1</p>
<p id="userip"></p>
</div>
</a>