Source for file CAPTCHA_Figlet_test.php
Documentation is available at CAPTCHA_Figlet_test.php
require_once 'Text/CAPTCHA.php';
// Set CAPTCHA image options
// font_file can either be an array or a string
// style is optional and specifies inline css to be used
'font_file' => glob('*.flf'),
'style' => array ('border' => '1px dashed red',
'background' => 'black'),
// There is no way to set the 'height' property
// output options are 'javascript', 'html' or 'text' default is html
'output' => 'javascript',
'options' => $textOptions
// Generate a new Text_CAPTCHA object, Image driver
$retval = $c->init ($options);
if (PEAR ::isError ($retval)) {
echo 'Error initializing CAPTCHA!';
// Get CAPTCHA secret passphrase
$text = $c->getCAPTCHA ();
if (PEAR ::isError ($text)) {
echo $text->getMessage ();
echo 'Error generating CAPTCHA!';
echo " <pre>$text</pre><br />";
echo " Solution: $phrase";
Documentation generated on Mon, 11 Mar 2019 14:44:40 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|