Skip to content

How to use image captcha

hli67 edited this page Nov 29, 2014 · 2 revisions

Copy font file to the font dir and create the images/tmp directory first and/or adjust to your needs:

'form_captcha_options' => array(
    'class'   => 'image',
    'options' => array(
                    'font' => __DIR__.'/../../public/fonts/Vera.ttf',
                    'imgDir' => __DIR__.'/../../public/images/tmp',
                    'imgUrl'=>'/images/tmp/',
                    'wordLen' => 5,
                    'fontsize'=>26,
                    'height'=>60,
                    'width'=>200,
                    'dotNoiseLevel' => 50,
                    'lineNoiseLevel' => 6,
    				'Messages' => array('badCaptcha' => 'Wrong Antispam-Code'),
	        'expiration' => 300,
	        'timeout'    => 300,
    ),
),