Add IP detection with ipify
This commit is contained in:
parent
19f0c23bb3
commit
5053d5083e
1 changed files with 8 additions and 1 deletions
9
ip.html
9
ip.html
|
@ -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>
|
||||
|
||||
|
|
Loading…
Reference in a new issue