Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $imageOptions = array(
- 'font_size' => 24,
- 'font_path' => Zend_Registry::get('config')->paths->data,
- 'font_file' => 'segoeprb.ttf',
- 'text_color' => '#DDFF99',
- 'lines_color' => '#CCEEDD',
- 'background_color' => '#555555'
- );
- $captcha = Text_CAPTCHA::factory('Image');
- $captcha->init(180, 60, $phrase, $imageOptions);
- $session->phrase = $captcha->getPhrase();
- // disable auto-rendering since we're outputting an image
- $this->_helper->viewRenderer->setNoRender();
- header('Content-type: image/png');
- echo $captcha->getCAPTCHAAsPng();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement