News Feed
Jobs Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Sankho Mallik's Blog:
Tutorial Using Zend_Captcha_Image
December 19, 2008 @ 13:36:18

In a recent post to his blog Sankho Mallik has posted a quick tutorial on using the Zend_Captcha component of the Zend Framework in your forms.

Zend Framework has a set of great classes included to take away a lot of the headaches involved with setting up a CAPTCHA system. The one I use is Zend_Captcha_Image, which creates an image for you and sets up a Session so you will be able to validate all information appropriately. Problem is, there's little documentation out there on this. [...] I'll show you everything you need to know to use Zend_Captcha_Image WITHOUT Zend_Form! If you'd like to learn the implementation using Zend_Form, please visit Robert Basic's Blog.

He follows the steps you'll need to get the component set up - checking for GD installation, making the CAPTCHA image folder - and includes some sample code in the form of a generateCaptcha and validateCaptcha methods to make it all work.

0 comments voice your opinion now!
tutorial zendcaptcha zendframework component captcha image


Robert Basic's Blog:
A Zend_Captcha example
October 23, 2008 @ 10:27:17

Robert Basic found the creation of a CAPTCHA with the Zend_Captcha and Zend_Form components of the Zend Framework "a bit tricky" and decided to share an example he's come up with to help others out there.

I'll just show a quick example how to implement Zend_Captcha into a Zend_Form, may be useful for someone. There are several CAPTCHA types in ZF, like the Image, Figlet and Dumb. I use Image.

He includes the code for his form where the CAPTCHA component is configured to use a certain directories for the location to put the images, the font to use, and the label to put on it. He sets up the action for it and creates a captchaAction method in the same controller. This does the validation on the entered term to ensure that it matches the string in the image exactly.

0 comments voice your opinion now!
zendframework zendcaptcha zendform tutorial



Community Events











Don't see your event here?
Let us know!


framework unittest language code application release facebook introduction package hhvm series install composer podcast dependency opinion symfony2 security component hack

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework