CloudBT CloudBT
  • 07-12-2023, 20:54:18
    #1
    Düzenlenmiştir.
  • 07-12-2023, 20:59:47
    #2
    yapay zekaya sordum
    Verdiği cevap

    Eğer sayfayı geçmek için robot doğrulama yapılmasını istiyorsanız, kullanıcıların robot doğrulama işlemini tamamlamadan önce ana sayfaya erişmelerini engellemelisiniz. İşte bu amaca yönelik bir örnek:
    <!DOCTYPE html> <html lang="en"> <head>    <meta charset="UTF-8">    <meta name="viewport" content="width=device-width, initial-scale=1.0">    <title>Rastgele Elementler</title>    <style>        body {            display: flex;            align-items: center;            justify-content: center;            height: 100vh;            margin: 0;        }         #container {            text-align: center;        }         #result {            font-size: 24px;            margin-bottom: 10px;        }         #inputBox {            padding: 5px;        }         #devamEtButton {            background-color: #ff0000;            color: #fff;            padding: 10px 20px;            cursor: pointer;        }         #robotDogrulama {            display: none; /* Robot doğrulama başlangıçta gizli olacak */        }         #anaSayfa {            display: none; /* Ana sayfa başlangıçta gizli olacak */        }    </style> </head> <body>    <div id="robotDogrulama">        <!-- Burada robot doğrulama kodları yer alacak -->        <p>Robot doğrulama formu</p>        <input type="text" id="robotInput" placeholder="Robot doğrulama kodunu girin">        <button onclick="completeRobotVerification()">Doğrula</button>    </div>    <div id="anaSayfa">        <!-- Ana sayfa içeriği burada yer alacak -->        <div id="result">Kutucuğa gireceğiniz sayıyı bekliyoruz...</div>        <input type="text" id="inputBox" placeholder="Sayıyı girin">        <button id="devamEtButton" onclick="checkNumber()">Devam Et</button>    </div>    <script>        // Rastgele altı basamaklı sayılarla doldurulan 250 element        const elements = Array.from({ length: 250 }, () => Math.floor(100000 + Math.random() * 900000));         // Rastgele seçilen elementin index'i        let currentIndex = Math.floor(Math.random() * elements.length);         // HTML elementlerine erişim        const robotDogrulamaDiv = document.getElementById('robotDogrulama');        const anaSayfaDiv = document.getElementById('anaSayfa');        const robotInput = document.getElementById('robotInput');        const resultElement = document.getElementById('result');        const inputBox = document.getElementById('inputBox');         // Robot doğrulama işlemini tamamla        function completeRobotVerification() {            // Burada robot doğrulama kodunu kontrol et, eğer doğruysa ana sayfayı göster            const robotVerificationCode = robotInput.value;            if (robotVerificationCode === "doğrulama_kodu") {                robotDogrulamaDiv.style.display = 'none';                anaSayfaDiv.style.display = 'block';                updateResult();            } else {                alert('Yanlış doğrulama kodu! Lütfen tekrar deneyin.');            }        }         // Kullanıcının girdiği sayıyı kontrol et        function checkNumber() {            // Kontrol kodları burada devam eder...        }         // Sonuç kutusunu güncelle        function updateResult() {            resultElement.textContent = `Üzerindeki sayı: ${elements[currentIndex]}`;        }    </script> </body> </html>
  • 07-12-2023, 21:02:46
    #3
    oflibaba adlı üyeden alıntı: mesajı görüntüle
    yapay zekaya sordum
    Verdiği cevap

    Eğer sayfayı geçmek için robot doğrulama yapılmasını istiyorsanız, kullanıcıların robot doğrulama işlemini tamamlamadan önce ana sayfaya erişmelerini engellemelisiniz. İşte bu amaca yönelik bir örnek:
    <!DOCTYPE html> <html lang="en"> <head>    <meta charset="UTF-8">    <meta name="viewport" content="width=device-width, initial-scale=1.0">    <title>Rastgele Elementler</title>    <style>        body {            display: flex;            align-items: center;            justify-content: center;            height: 100vh;            margin: 0;        }         #container {            text-align: center;        }         #result {            font-size: 24px;            margin-bottom: 10px;        }         #inputBox {            padding: 5px;        }         #devamEtButton {            background-color: #ff0000;            color: #fff;            padding: 10px 20px;            cursor: pointer;        }         #robotDogrulama {            display: none; /* Robot doğrulama başlangıçta gizli olacak */        }         #anaSayfa {            display: none; /* Ana sayfa başlangıçta gizli olacak */        }    </style> </head> <body>    <div id="robotDogrulama">        <!-- Burada robot doğrulama kodları yer alacak -->        <p>Robot doğrulama formu</p>        <input type="text" id="robotInput" placeholder="Robot doğrulama kodunu girin">        <button onclick="completeRobotVerification()">Doğrula</button>    </div>    <div id="anaSayfa">        <!-- Ana sayfa içeriği burada yer alacak -->        <div id="result">Kutucuğa gireceğiniz sayıyı bekliyoruz...</div>        <input type="text" id="inputBox" placeholder="Sayıyı girin">        <button id="devamEtButton" onclick="checkNumber()">Devam Et</button>    </div>    <script>        // Rastgele altı basamaklı sayılarla doldurulan 250 element        const elements = Array.from({ length: 250 }, () => Math.floor(100000 + Math.random() * 900000));         // Rastgele seçilen elementin index'i        let currentIndex = Math.floor(Math.random() * elements.length);         // HTML elementlerine erişim        const robotDogrulamaDiv = document.getElementById('robotDogrulama');        const anaSayfaDiv = document.getElementById('anaSayfa');        const robotInput = document.getElementById('robotInput');        const resultElement = document.getElementById('result');        const inputBox = document.getElementById('inputBox');         // Robot doğrulama işlemini tamamla        function completeRobotVerification() {            // Burada robot doğrulama kodunu kontrol et, eğer doğruysa ana sayfayı göster            const robotVerificationCode = robotInput.value;            if (robotVerificationCode === "doğrulama_kodu") {                robotDogrulamaDiv.style.display = 'none';                anaSayfaDiv.style.display = 'block';                updateResult();            } else {                alert('Yanlış doğrulama kodu! Lütfen tekrar deneyin.');            }        }         // Kullanıcının girdiği sayıyı kontrol et        function checkNumber() {            // Kontrol kodları burada devam eder...        }         // Sonuç kutusunu güncelle        function updateResult() {            resultElement.textContent = `Üzerindeki sayı: ${elements[currentIndex]}`;        }    </script> </body> </html>
    Olmadı hocam.
  • 07-12-2023, 21:04:14
    #4
    soylenmezsmt adlı üyeden alıntı: mesajı görüntüle
    Olmadı hocam.
    hocam yapay zekayı kullan derim. Olmayan yeri söyle tekrar verir. adım adım gidersen sana istediğin kodu verecektir emin ol.
  • 07-12-2023, 21:09:33
    #5
    Anladığım kadarı ile bu kod size yardımcı olacaktır.

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Robot Doğrulama</title>
        <style>
            body {
                display: flex;
                align-items: center;
                justify-content: center;
                height: 100vh;
                margin: 0;
            }
     
            #container {
                text-align: center;
            }
     
            #result {
                font-size: 24px;
                margin-bottom: 10px;
            }
     
            #inputBox {
                padding: 5px;
            }
     
            #devamEtButton {
                background-color: #ff0000;
                color: #fff;
                padding: 10px 20px;
                cursor: pointer;
            }
    
            /* Ana içerik stilleri */
            .main-content {
                display: none; /* Başlangıçta ana içerik gizli olacak */
                text-align: center;
                font-size: 24px;
                margin-top: 50px;
            }
        </style>
    </head>
    <body>
        <div id="container">
            <div id="result">Üzerindeki sayı: <span id="randomNumber"></span></div>
            <input type="text" id="inputBox" placeholder="Sayıyı girin">
            <button id="devamEtButton" onclick="checkNumber()">Devam Et</button>
        </div>
     
        <div class="main-content">
            <!-- Ana içerik burada olacak -->
            <h1>Hoş Geldiniz!</h1>
            <p>Site içeriği burada olacak...</p>
            <p>Burada yönlendirileceksiniz. Kalan süre: <span id="redirectTimer">5</span> saniye.</p>
        </div>
    
        <script>
            // Rastgele altı basamaklı sayılarla doldurulan 250 element
            const elements = Array.from({ length: 250 }, () => Math.floor(100000 + Math.random() * 900000));
            let currentIndex = Math.floor(Math.random() * elements.length);
            const resultElement = document.getElementById('result');
            const inputBox = document.getElementById('inputBox');
            const randomNumberElement = document.getElementById('randomNumber');
            const mainContent = document.querySelector('.main-content');
            
            // Sayfa yüklendiğinde rastgele numarayı göster
            window.onload = function() {
                randomNumberElement.textContent = elements[currentIndex];
            };
            
            // Check function for number verification
            function checkNumber() {
                const userInput = parseInt(inputBox.value);
     
                if (!isNaN(userInput) && userInput === elements[currentIndex]) {
                    currentIndex = Math.floor(Math.random() * elements.length);
                    updateResult();
                    allowAccess(); // Allow access to main content
                } else {
                    alert('Yanlış numara! Sayfa yeniden başlatılıyor...');
                    location.reload();
                }
            }
            
            // Update result box
            function updateResult() {
                randomNumberElement.textContent = elements[currentIndex];
            }
            
            // Function to allow access to the main content
            function allowAccess() {
                // Ana içeriği göster
                mainContent.style.display = 'block';
                // Doğrulama alanını gizle
                document.getElementById('container').style.display = 'none';
            }
            // Sayfa yüklendiğinde rastgele numarayı göster
            window.onload = function() {
                randomNumberElement.textContent = elements[currentIndex];
                redirectTimer(); // 5 saniyelik yönlendirme süresini başlat
            };
            
            // Diğer fonksiyonlar burada
    
            // Fonksiyon: 5 saniyelik süre bitince yönlendirme
            function redirectTimer() {
                let seconds = 5;
                const redirectInterval = setInterval(function() {
                    document.getElementById('redirectTimer').textContent = seconds;
                    seconds--;
    
                    if (seconds < 0) {
                        clearInterval(redirectInterval);
                        redirectToPage(); // Yönlendirme fonksiyonunu çağır
                    }
                }, 1000);
            }
    
            // Fonksiyon: Yönlendirme
            function redirectToPage() {
                let count = 5; // Yönlendirme için geri sayım süresi
                const redirectCountdown = setInterval(function() {
                    document.getElementById('redirectTimer').textContent = count;
                    count--;
    
                    if (count < 0) {
                        clearInterval(redirectCountdown);
                        window.location.href = 'https://www.yonlendirme-linki.com'; // Yönlendirme yapılacak link
                    }
                }, 1000);
            }
        </script>
    </body>
    </html>