Bonsoir à tous
Voilà je cherche à intégrer un nouveau captcha dans mon site Web au lieu du recpatcha , mais je n'y arrive pas .
Voici un exemple d'intégration du nouveau captcha , il fonctionne parfaitement .
Maintenant je voudrais si le captcha est saisi correctement que l'utilisateur soit redirigé vers SHOWLINKS pour voir les liens sinon un message d'erreur apparait ...
La page du "CAPTCHAFORM " du recaptcha était comme ca :
Comment je peux intégrer le nouveau captcha ?
Merci à vous .
Modifié par ziko00212 (13 Aug 2012 - 22:25)
      
      
    Voilà je cherche à intégrer un nouveau captcha dans mon site Web au lieu du recpatcha , mais je n'y arrive pas .
Voici un exemple d'intégration du nouveau captcha , il fonctionne parfaitement .
<form method='post'>
<?php require_once('captcha-lib.php'); 
$publicKey = "XXX"; 
$privateKey = "XXX"; 
$authenKey = "XXX"; 
# Reponse des services du captcha
$response = null; 
# Code erreur 
$error = null; 
if (isset($_POST["captcha_response_field"])) { 
$remoteIp = $_SERVER['REMOTE_ADDR']; 
# Controle du captcha 
$response = captcha_verify ($privateKey, $_POST["captcha_challenge_field"], $_POST["captcha_response_field"], $remoteIp, $authenKey); 
if ($response->is_valid) { 
echo "Valid captcha answer!"; 
} else { 
$error = $response->error; 
} 
}
 # Affichage du captcha 
 echo captcha_generate_html($publicKey, $error); 
 ?> 
 
 <div><input type="submit" value="submit"/></div> 
 </form>
Maintenant je voudrais si le captcha est saisi correctement que l'utilisateur soit redirigé vers SHOWLINKS pour voir les liens sinon un message d'erreur apparait ...
La page du "CAPTCHAFORM " du recaptcha était comme ca :
<form name='linkprotect' action='showlinks.php' method='POST' enctype='application/x-www-form-urlencoded' >      
                                <div class="links_form">
                                    <div class="form1">                                    
                                        <h2></h2>
 <?php
require_once('captcha/recaptchalib.php');
// $publickey = "XXX";
 echo recaptcha_get_html($publickey);
    ?>
                                    </div>
                                     <div class="form1">                                    
                                       
                                       <input type="hidden" name="linkid" value="<?php echo $linkid; ?>"> 
                                       
       
                                   </div>
                                             </div>
                                             
                                    <div class="captcha"><input type="image" src="images/viewlinks.png" id="Protect" /></div>
                                </div>
                                  </form> 
                             
Comment je peux intégrer le nouveau captcha ?
Merci à vous .
Modifié par ziko00212 (13 Aug 2012 - 22:25)