Version 1.9g
This commit is contained in:
parent
d028822d0b
commit
4c9814a99c
800 changed files with 237325 additions and 1949 deletions
5
artichow/examples/tutorials/AntiSpam/form.php
Normal file
5
artichow/examples/tutorials/AntiSpam/form.php
Normal 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>
|
||||
18
artichow/examples/tutorials/AntiSpam/spam.php
Normal file
18
artichow/examples/tutorials/AntiSpam/spam.php
Normal 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();
|
||||
|
||||
?>
|
||||
11
artichow/examples/tutorials/AntiSpam/valid.php
Normal file
11
artichow/examples/tutorials/AntiSpam/valid.php
Normal 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 :-(";
|
||||
}
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue