Ejemplo n.º 1
0
}
//////////////////////////////////////////////////////////////////////////////////////////////////
// make image
/**
 * the time() at the end of the address is just to keep the image from being cached
 * <img id="captcha_img" src="./captcha/cf.captcha.php?img=<?=time();?>" />
 *
 */
if (isset($_GET['img'])) {
    $capt = new captcha();
    if (isset($_GET['bg'])) {
        //$capt->transparent_bg(false);
        //$capt->bg_color($_GET['bg']);
        $capt->colorshad = 'd';
    }
    $capt->add_wave();
    $capt->display();
    exit;
}
//////////////////////////////////////////////////////////////////////////////////////////////////
// captcha Class
class captcha
{
    private $UserString;
    /**
     * The width of the captcha image
     * @var integer
     */
    private $width = 120;
    /**
     * The height of the captcha image