Delete ip-info and update site-directory/index.html

This commit is contained in:
Primrose 2023-05-20 21:09:52 -04:00
parent 45703b8b1a
commit 06d3caec80
2 changed files with 0 additions and 44 deletions

View File

@ -1,42 +0,0 @@
<!--Copyright © 2022-2023 Lilium_Snow-->
<!--This 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']);
$token = "your_token_here";
$request_url = file_get_contents("https://ipinfo.io/" . $client_ip . "/json/?token=" . $token);
$json = json_decode($request_url);
echo "<p>IP Address: $client_ip</p>";
echo "<p>Hostname: $client_hostname</p>";
echo "<p>ISP: " . $json->org, "</p>";
echo "<p>City: " . $json->city, "</p>";
echo "<p>Region: " . $json->region, "</p>";
echo "<p>Country: " . $json->country, "</p>";
echo "<p>Coordinates: " . $json->loc, "</p>";
echo "<p>Postal Code: " . $json->postal, "</p>";
echo "<p>Timezone: " . $json->timezone, "</p>";
?>
</div>
</body>
</html>

View File

@ -33,8 +33,6 @@
<p>6. <a href="/media">Media</a> - A collection of random images, videos, and other miscellaneous files</p>
<br>
<p>7. <a href="https://git.snowcake.me">Gitea</a> - My own Gitea instance, which hosts projects that i'm working on, along with mirrors of other projects</p>
<br>
<p>8. <a href="/ip-info">IP Info</a> - View information about your WAN IP address</p>
</div>
<br>
<br>