Refraichir l'image du cpatcha sur un formulai
celticoi
Messages postés
5
Statut
Membre
-
avion-f16 Messages postés 19182 Date d'inscription Statut Contributeur Dernière intervention -
avion-f16 Messages postés 19182 Date d'inscription Statut Contributeur Dernière intervention -
Bonsoir !!
j'ai un code captcha pour verifier l'enregistrement et eviter le spam ...
voila le code du fichier captcha.php :
<?
if (eregi("captcha.php","$HTTP_SERVER_VARS[PHP_SELF]")) {
header("HTTP/1.0 404 Not Found");
exit();
}
session_start();
$text = rand(10000,99999);
$_SESSION["CaptchaSerial"] = $text;
$image_p =imagecreatefromjpeg("images/captcha.jpg");
$black = imagecolorallocate($image_p, 0, 0, 0);
$white = imagecolorallocate($image_p, 255, 255, 255);
$font_size = 120;
imagestring($image_p, $font_size, 40, 10, $text, $white);
imagejpeg($image_p, null, 80);
?>
-----------------------------------------------------------------------------------------
et pour appeller ce fichier, j'ai mit ce code dans le fichier register.php :
<tr class="fixed">
<td class="optionheader"><nobr>entrer SVP ce code de verification :<br>
<img src="captcha.php"></nobr><a href="captcha.php"></a><br>
</td>
<td class="list" colSpan="3"><input type="text" name="captchacode" /></td>
</tr>
-----------------------------------------------------------------------------------------
Le problème est que je voudrais ajouter une icone "refraichir" qui refraiche juste l'image du captcha sans actualisé toute la page ..
j'ai essayer plein du suggestion donnée sur le CCM mais ca marchais pas ..
Si qqn à une solution ca serais trés gentil ..
Merci ..
j'ai un code captcha pour verifier l'enregistrement et eviter le spam ...
voila le code du fichier captcha.php :
<?
if (eregi("captcha.php","$HTTP_SERVER_VARS[PHP_SELF]")) {
header("HTTP/1.0 404 Not Found");
exit();
}
session_start();
$text = rand(10000,99999);
$_SESSION["CaptchaSerial"] = $text;
$image_p =imagecreatefromjpeg("images/captcha.jpg");
$black = imagecolorallocate($image_p, 0, 0, 0);
$white = imagecolorallocate($image_p, 255, 255, 255);
$font_size = 120;
imagestring($image_p, $font_size, 40, 10, $text, $white);
imagejpeg($image_p, null, 80);
?>
-----------------------------------------------------------------------------------------
et pour appeller ce fichier, j'ai mit ce code dans le fichier register.php :
<tr class="fixed">
<td class="optionheader"><nobr>entrer SVP ce code de verification :<br>
<img src="captcha.php"></nobr><a href="captcha.php"></a><br>
</td>
<td class="list" colSpan="3"><input type="text" name="captchacode" /></td>
</tr>
-----------------------------------------------------------------------------------------
Le problème est que je voudrais ajouter une icone "refraichir" qui refraiche juste l'image du captcha sans actualisé toute la page ..
j'ai essayer plein du suggestion donnée sur le CCM mais ca marchais pas ..
Si qqn à une solution ca serais trés gentil ..
Merci ..
1 réponse
-
Inspires-toi de ce système.
-
-
Voilà la démo : http://www.captcha.fr/?page=2&langue=fr
-
-
coucou,
j'ai un petit soucis dans cette partie :
<?php dsp_crypt(0,1); ?>
voir documentation ..http://www.captcha.fr/?page=34
le fonction dsp_crypt n'est pas reconue par le systeme, et s'affiche rien sur le formulaire .. -
-