<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>LMMx9 IP INFO</title>
    <style>
        body {
            background-color: black;
            color: #00FF00; 
            font-family: 'Arial', sans-serif;
            text-align: center;
            margin: 0;
            padding: 0;
            overflow: hidden;
        }
        h1 {
            font-size: 40px;
            font-weight: bold;
            margin-top: 50px;
            animation: fadeIn 2s ease-out;
        }
        p {
            font-size: 18px;
            margin: 10px 0;
            animation: fadeIn 2s ease-out;
        }
        input[type="text"] {
            font-size: 18px;
            padding: 10px;
            border: 2px solid #00FF00;
            background-color: black;
            color: #00FF00;
            border-radius: 5px;
            width: 250px;
            animation: fadeIn 2s ease-out;
        }
        input[type="button"] {
            background-color: black;
            color: #00FF00;
            padding: 10px 20px;
            font-size: 18px;
            border: 2px solid #00FF00;
            border-radius: 5px;
            cursor: pointer;
            transition: background-color 0.3s;
        }
        input[type="button"]:hover {
            background-color: #00FF00;
            color: black;
        }
        .response {
            margin-top: 20px;
            padding: 20px;
            border: 2px solid #00FF00;
            display: none;
            background-color: rgba(0, 255, 0, 0.1);
            max-width: 80%;
            margin: 20px auto;
            border-radius: 10px;
            animation: slideIn 1s ease-out;
            white-space: pre-wrap;
        }
        .response p {
            margin: 0;
            font-size: 16px;
            text-align: left;
        }
        .go-back {
            text-decoration: none;
            font-size: 18px;
            color: #00FF00;
            margin-top: 20px;
            display: block;
            animation: fadeIn 2s ease-out;
        }
        @keyframes fadeIn {
            0% {
                opacity: 0;
            }
            100% {
                opacity: 1;
            }
        }
        @keyframes slideIn {
            0% {
                transform: translateX(100%);
            }
            100% {
                transform: translateX(0);
            }
        }
    </style>
</head>
<body>

    <h1>LMMx9 IP INFO</h1>
    <p>Enter an IP address to get full information</p>

    <input type="text" id="ipInput" placeholder="Enter IP address" />
    <input type="button" value="GET INFO" onclick="getIPInfo()" />
    
    <div id="response" class="response"></div>

    <a href="#" id="goBack" class="go-back" style="display: none;" onclick="goBack()">GO BACK</a>

    <script>
        function getIPInfo() {
            var ip = document.getElementById('ipInput').value;
            if (!ip) {
                alert("Please enter a valid IP address.");
                return;
            }
            

            var responseDiv = document.getElementById('response');
            responseDiv.style.display = 'block';
            responseDiv.innerHTML = '<p>Loading IP information...</p>';


            var apiUrl = `https://ipinfo.io/${ip}/json`;

            fetch(apiUrl)
                .then(response => {
                    if (!response.ok) {
                        throw new Error('Unable to fetch IP information');
                    }
                    return response.json();
                })
                .then(data => {
                 
                    responseDiv.innerHTML = `
                        <p><strong>IP Address:</strong> ${data.ip}</p>
                        <p><strong>Hostname:</strong> ${data.hostname || 'N/A'}</p>
                        <p><strong>City:</strong> ${data.city || 'N/A'}</p>
                        <p><strong>Region:</strong> ${data.region || 'N/A'}</p>
                        <p><strong>Country:</strong> ${data.country || 'N/A'}</p>
                        <p><strong>Location:</strong> ${data.loc || 'N/A'}</p>
                        <p><strong>Organization:</strong> ${data.org || 'N/A'}</p>
                        <p><strong>Timezone:</strong> ${data.timezone || 'N/A'}</p>
                    `;
                    document.getElementById('goBack').style.display = 'block';
                })
                .catch(error => {
                    responseDiv.innerHTML = '<p style="color: red;">IP Information Not Found.</p>';
                });
        }

        function goBack() {

            window.location.href = "http://lmnxhasan.is-great.org"; 
        }
    </script>

</body>
</html>
