Update ip-info/index.php
This commit is contained in:
parent
7ad385b903
commit
938b4ab2f9
|
@ -1,7 +1,31 @@
|
|||
<?php
|
||||
<!--Page design by Lilium_Snow (Primrose) (2022)-->
|
||||
<!--This HTML document is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License. Get a copy of the license at https://creativecommons.org/licenses/by-sa/4.0/legalcode-->
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<title>IP Info - Snowcake</title>
|
||||
<link rel="icon" type="image/x-icon" href="/assets/images/favicon.png">
|
||||
<link rel="stylesheet" href="/main_theme.css">
|
||||
<meta charset="UTF-8">
|
||||
</head>
|
||||
<body>
|
||||
<h1>IP Info</h1>
|
||||
<div>
|
||||
<a href="/" class="button">🏠 Back to Home</a>
|
||||
</div>
|
||||
<br>
|
||||
<br>
|
||||
<div class="content">
|
||||
<?php
|
||||
$client_ip = $_SERVER['REMOTE_ADDR'];
|
||||
$client_hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']);
|
||||
|
||||
echo "<p>IP address: <b>$client_ip</b></p>";
|
||||
echo "<p>Hostname: <b>$client_hostname</b></p>";
|
||||
?>
|
||||
echo "<p>IP: $client_ip</p>";
|
||||
echo "<p>Hostname: $client_hostname</p>";
|
||||
?>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in New Issue