/usr/share/doc/php-text-captcha/Text_CAPTCHA/examples/CAPTCHA_Equation_test.php is in php-text-captcha 0.4.3-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | <?php
require_once 'Text/CAPTCHA.php';
$c = Text_CAPTCHA::factory('Equation');
$ret = $c->init();
if (PEAR::isError($ret)) {
echo $ret->getMessage();
exit(1);
}
echo 'Equation: ' . $c->getCAPTCHA() . "<br />";
echo 'Solution: ' . $c->getPhrase() . "<br />";
$options = array(
'min' => 1,
'max' => 4,
'numbersToText' => true,
'severity' => 2
);
$ret = $c->init($options);
if (PEAR::isError($ret)) {
echo $ret->getMessage();
exit(1);
}
echo 'Equation: ' . $c->getCAPTCHA() . "<br />";
echo 'Solution: ' . $c->getPhrase() . "<br />";
?>
|