myip.coffee/index.php
Kumi 9c1c148da0
fix: removed extra quotation mark in HTML class attribute
Corrected an HTML syntax error by removing a redundant quotation mark from a class attribute. This fixes the display issue for the IP card component, ensuring proper rendering of the IPv4 address section.
2024-09-18 10:01:28 +02:00

68 lines
No EOL
2.7 KiB
PHP

<?php
$domain = $_SERVER['HTTP_HOST'];
$domain = preg_replace('/^www\./', '', $domain);
$ipv4_endpoint = "https://ipv4." . $domain;
$ipv6_endpoint = "https://ipv6." . $domain;
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Welcome to MyIP.Coffee</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<div class="container">
<h1>MyIP.Coffee</h1>
<nav>
<ul>
<li><a href="#ipv4">IPs</a></li>
<li><a href="#about">About</a></li>
<li><a href="#api">API</a></li>
</ul>
</nav>
</div>
</header>
<section class="hero">
<div class="container">
<h2>Discover Your IP Address Instantly</h2>
<p>Fast, reliable, and coffee-powered. Your public IP addresses displayed below:</p>
</div>
</section>
<main>
<div class="container">
<section class="ip-display">
<div class="ip-card">
<h3>IPv4 Address</h3>
<p id="ipv4">
<iframe src="<?php echo $ipv4_endpoint; ?>" frameborder="0" width="100%" height="100%"></iframe>
</p>
</div>
<div class="ip-card">
<h3>IPv6 Address</h3>
<p id="ipv6">
<iframe src="<?php echo $ipv6_endpoint; ?>" frameborder="0" width="100%" height="100%"></iframe>
</p>
</div>
</section>
<section id="about">
<h2>About MyIP.Coffee</h2>
<p>MyIP.Coffee was brewed with the idea of providing internet users a quick way to check their public IPv4 and IPv6 addresses. Whether you're troubleshooting network issues, setting up a server, or just curious, our site serves up your IP addresses without any fuss or frills.</p>
</section>
<section id="api">
<h2>Programmatical use</h2>
<p>You can get your current IP addresses from <code>https://ipv4.myip.coffee</code> and <code>https://ipv6.myip.coffee</code>.</p>
</section>
</div>
</main>
<footer>
<div class="container">
<p>&copy; 2024 Private.coffee | <a href="https://private.coffee/privacy.html">Privacy Policy</a> | <a href="https://private.coffee/legal.html">Legal Notice</a> | <a href="https://git.private.coffee/PrivateCoffee/myip.coffee">Git</a></p>
</div>
</footer>
<script src="script.js"></script>
</body>
</html>