Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
require_once 'Text/CAPTCHA.php';
3
$c = Text_CAPTCHA::factory('Equation');
4
 
5
$ret = $c->init();
6
if (PEAR::isError($ret)) {
7
    echo $ret->getMessage();
8
    exit(1);
9
}
10
echo 'Equation: ' . $c->getCAPTCHA() . "<br />";
11
echo 'Solution: ' . $c->getPhrase() . "<br />";
12
 
13
$options = array(
14
    'min' => 1,
15
    'max' => 4,
16
    'numbersToText' => true,
17
    'severity' => 2
18
);
19
$ret = $c->init($options);
20
if (PEAR::isError($ret)) {
21
    echo $ret->getMessage();
22
    exit(1);
23
}
24
echo 'Equation: ' . $c->getCAPTCHA() . "<br />";
25
echo 'Solution: ' . $c->getPhrase() . "<br />";
26
 
27
?>