Sondage :

Publicité




Partenaires




Jmax-Hardware

mxdev.net

feedburner
donate.gif


1 visiteur(s) en ligne
Forums d'entraide informatique - Les forums de PCW
[Résolu] Un captcha - Version imprimable

+- Forums d'entraide informatique - Les forums de PCW (http://forum.pcinfo-web.com)
+-- Forum : Le site (/forumdisplay.php?fid=42)
+--- Forum : À propos de PCW (/forumdisplay.php?fid=26)
+---- Forum : Suggestions (/forumdisplay.php?fid=76)
+---- Discussion : [Résolu] Un captcha (/showthread.php?tid=5081)



Un captcha - Informaticien zero - 24-09-2011 10:46 AM

Chez pcinfowebien et pcinfowebienne,

J'ai remarqué le nombre de robots qu'il y a des votre site web.
Un captcha s'impose.

Voilà le code d'un captcha:


<?php
// Fonction captcha()
// Permet de générer un code captcha.

function captcha($nombreCaractere)
{
$chaine = 'ABCDEFGHIJKLMNPQRSTUVWXYZ123456789';
$codeCaptcha = '';

for($i=0; $i<$nombreCaractere; $i++)
{
$nombreAleatoire = rand(0, strlen($chaine)-1);
$codeCaptcha .= $chaine[$nombreAleatoire];
}

return $codeCaptcha;
}
?>

Bonne journée


RE: Un captcha - Troll - 24-09-2011 11:56 AM

Salut Informaticien zero

(24-09-2011 10:46 AM)Informaticien zero a écrit :  Chez pcinfowebien et pcinfowebienne,

J'ai remarqué le nombre de robots qu'il y a des votre site web.
Un captcha s'impose.

Voilà le code d'un captcha:


<?php
// Fonction captcha()
// Permet de générer un code captcha.

function captcha($nombreCaractere)
{
$chaine = 'ABCDEFGHIJKLMNPQRSTUVWXYZ123456789';
$codeCaptcha = '';

for($i=0; $i<$nombreCaractere; $i++)
{
$nombreAleatoire = rand(0, strlen($chaine)-1);
$codeCaptcha .= $chaine[$nombreAleatoire];
}

return $codeCaptcha;
}
?>

Bonne journée


Il y a déjà un captcha depuis toujours sur PCW. Pour les posts faits depuis les invités uniquement. Pour les inscriptions il y a une protection antibot.


RE: Un captcha - Informaticien zero - 24-09-2011 13:02 PM

D'accord, rien à dire. Smile