Subversion Repositories Applications.gtt

Compare Revisions

Ignore whitespace Rev 61 → Rev 149

/tags/v1.0-Homere/bibliotheque/artichow/examples/tutorials/AntiSpam/spam.php
New file
0,0 → 1,18
<?php
 
require_once '../../../AntiSpam.class.php';
 
// On créé l'image anti-spam
$object = new AntiSpam();
 
// La valeur affichée sur l'image fera 5 caractères
$object->setRand(5);
 
// On assigne un nom à cette image pour vérifier
// ultérieurement la valeur fournie par l'utilisateur
$object->save('example');
 
// On affiche l'image à l'écran
$object->draw();
 
?>
/tags/v1.0-Homere/bibliotheque/artichow/examples/tutorials/AntiSpam/form.php
New file
0,0 → 1,5
<form action="valid.php" method="get">
<img src="spam.php" style="vertical-align: middle"/>
<input type="text" name="code"/>
<input type="submit" value="Submit"/>
</form>
/tags/v1.0-Homere/bibliotheque/artichow/examples/tutorials/AntiSpam/valid.php
New file
0,0 → 1,11
<?php
require_once "../../../AntiSpam.class.php";
 
$object = new AntiSpam();
 
if($object->check('example', $_GET['code'])) {
echo "Good value :-)";
} else {
echo "Bad value :-(";
}
?>