Created
March 5, 2011 17:25
-
-
Save boxers999/856519 to your computer and use it in GitHub Desktop.
Structure for a Zend_Form_Element_Capcha() as an image
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$captcha = new Zend_Form_Element_Captcha('captcha', // This is the name of the input field | |
array('label' => 'Are you human ?', | |
'captcha' => array( // Here comes the magic... | |
// First the type... | |
'captcha' => 'Image', | |
// Length of the word... | |
'wordLen' => 6, | |
// Captcha timeout, 5 mins | |
'timeout' => 300, | |
// What font to use... | |
'font' => '/mnt/core/www/images/maian.ttf', | |
// Where to put the image | |
'imgDir' => '/mnt/core/www/images/', | |
// URL to the images | |
'imgUrl' => 'http://www.yourdomain.com', | |
))); | |
$this->addElement($captcha); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment