среда, 9 мая 2012 г.

Recaptcha в Zend Framework


Вот так просто можно добавить recaptcha в форму на Zend Framework
$this->addElement('captcha', 'captcha', array(
// 'label' => 'Please enter two words displayed below:',
'required' => true,
'captcha' => array(
'pubkey' => '6LfYA9ASAAAAAOuXUnGy1KXeosRuK9elHxAzy0**',
'privkey' => '6LfYA9ASAAAAAPxb21osjExcexZT7r1tTx2CCm**',
'captcha' => 'reCaptcha'
)
));
$this->getElement('captcha')->removeDecorator('Label');
Ключи можно получить тут - https://www.google.com/recaptcha/admin/list 

Комментариев нет: