• 08-01-2022, 00:46:06
    #1
    kayitol sayfasına capcha ekleyemedim bir türlü nasıl eklerim google aradım yapamadım yardımcı olursanız sevinirim

    bunlarda kayitol.php kodları burda nasıl bir kod eklerim
        </div>
            <div class="row">
                <div class="form-holder">
                    <div class="signin-signup-form">
                        <div class="form-items">
                            <div class="form-title"> Ücretsiz Kayıt Ol</div>
                            <form id="signinform" action="kayit.php" method="post">
                                <div class="form-text">
                                    <input type="email" id="user_email" autocomplete="off" name="Email" placeholder="E-Posta Adresiniz" required>
                                </div>
                                <div class="form-text">
                                    <input type="text" id="user_name" autocomplete="off" name="KullaniciAdi" placeholder="Kullanıcı Adı" required>
                                </div>
                                <div class="row">
                                    <div class="col-md-6 form-text">
                                        <input type="password" id="user_pass" autocomplete="off" name="Sifre" placeholder="Şifreniz" required>
                                    </div>
                                    <div class="col-md-6 form-text">
                                        <input type="password" id="user_pass" autocomplete="off" name="SifreTekrar" placeholder="Şifre Tekrar" required>
                                    </div>
                                </div>
                                <div class="form-text">
                                    <input type="text" id="user_name" autocomplete="off" maxlength="10" name="Telefon" placeholder="(5XX-XXX-XX-XX)" required>
                                
                                
                                
                                
                                 
    
                                </div>
                                <div class="form-button">
                                    <button id="submit" type="submit" onclick="myFunction()" class="btn btn-default">Kayıt Ol <i class="hno hno-arrow-right"></i></button>
                                </div>
                                
                                
                                
                                
                            </form>
                        </div>
                    </div>
                </div>
  • 08-01-2022, 00:46:37
    #2
    Üyeliği durduruldu
    Anydesk atarsanız yapayım 2 dk
  • 08-01-2022, 02:23:14
    #3
    function invisibleCaptcha($captcha) {
        $data = array(
            'secret'    => "SECRET",
            'response'  => $captcha
        );
    
        $verify = curl_init();
        curl_setopt($verify, CURLOPT_URL, "https://www.google.com/recaptcha/api/siteverify");
        curl_setopt($verify, CURLOPT_POST, true);
        curl_setopt($verify, CURLOPT_POSTFIELDS, http_build_query($data));
        curl_setopt($verify, CURLOPT_SSL_VERIFYPEER, false);
        curl_setopt($verify, CURLOPT_RETURNTRANSFER, true);
        $response = curl_exec($verify);
        $response = json_decode($response);
    
        if($response->success === true){
            return true;
        }
        else{
            return false;
        }
    }
    
    if(invisibleCaptcha($_POST['captcha-response'])){
        // captcha onaylandı
    }
    <form method="post" action="">
    <div class="form-group">
        <input type="text" name="name" class="form-control" />
    </div>
    <div class="form-group">
        <div class="g-recaptcha" data-sitekey="SITEKEY" data-badge="invisible" data-size="invisible" data-callback="setResponse"></div>
        <input type="hidden" id="captcha-response" name="captcha-response" />
    </div>
    </form>
  • 08-01-2022, 02:40:36
    #4
    Zalmoxis adlı üyeden alıntı: mesajı görüntüle
    function invisibleCaptcha($captcha) {
        $data = array(
            'secret'    => "SECRET",
            'response'  => $captcha
        );
    
        $verify = curl_init();
        curl_setopt($verify, CURLOPT_URL, "https://www.google.com/recaptcha/api/siteverify");
        curl_setopt($verify, CURLOPT_POST, true);
        curl_setopt($verify, CURLOPT_POSTFIELDS, http_build_query($data));
        curl_setopt($verify, CURLOPT_SSL_VERIFYPEER, false);
        curl_setopt($verify, CURLOPT_RETURNTRANSFER, true);
        $response = curl_exec($verify);
        $response = json_decode($response);
    
        if($response->success === true){
            return true;
        }
        else{
            return false;
        }
    }
    
    if(invisibleCaptcha($_POST['captcha-response'])){
        // captcha onaylandı
    }
    <form method="post" action="">
    <div class="form-group">
        <input type="text" name="name" class="form-control" />
    </div>
    <div class="form-group">
        <div class="g-recaptcha" data-sitekey="SITEKEY" data-badge="invisible" data-size="invisible" data-callback="setResponse"></div>
        <input type="hidden" id="captcha-response" name="captcha-response" />
    </div>
    </form>
    hangi kodu nereye koymam gerekiyor yapmadım kodlarda sorun var galiba
  • 08-01-2022, 11:29:01
    #5
    yapayzeka34 adlı üyeden alıntı: mesajı görüntüle
    hangi kodu nereye koymam gerekiyor yapmadım kodlarda sorun var galiba
    html kodunu kendi kayıt formunun içerisine, php kodundaki fonksyionu sayfada herhangi bir yere, fonksiyonu çeken if bloğunu ise php sayfandaki formu kontrol edip validate işlemlerini gerçekleştirdiğin yere koyman gerekiyor