Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1583 connectés 

  FORUM HardWare.fr
  Programmation
  PHP

  Problème d'intégration d'un captcha

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

Problème d'intégration d'un captcha

n°2153219
ziko00212
Posté le 13-08-2012 à 22:45:54  profilanswer
 

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 .
 
<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 .

mood
Publicité
Posté le 13-08-2012 à 22:45:54  profilanswer
 


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  PHP

  Problème d'intégration d'un captcha

 

Sujets relatifs
Problème de rétention avec RMANprobléme page html qui fonctionne sur pc mais pas sur site
Probleme avec curtime()Probleme
Intégration ldap sur sql serveurBesoin d'aide j'ai un problème dans mon jeu Démineur
probléme d'affichage d'une base de donnés (service web)Problème Slider image qui bug
Problème référencement site sur Google (redirection chez gandi)problème d'utilisation de variable shell dans un script
Plus de sujets relatifs à : Problème d'intégration d'un captcha


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR