29 2011

ReCaptcha Broken? Here’s the fix

Sometime recently ReCaptcha decommissioned its old API hosts: api*.recaptcha.net. The new API locations are at “http(s)://www.google.com/recaptcha/api”.

If you rely on Zend_Service_ReCaptcha (or its form element), you’ll need to change some constants in Zend/Service/ReCaptcha.php:

class Zend_Service_ReCaptcha extends Zend_Service_Abstract
{
    /**
     * URI to the regular API
     *
     * @var string
     */
    const API_SERVER = 'http://www.google.com/recaptcha/api';

    /**
     * URI to the secure API
     *
     * @var string
     */
    const API_SECURE_SERVER = 'https://www.google.com/recaptcha/api';

    /**
     * URI to the verify server
     *
     * @var string
     */
    const VERIFY_SERVER = 'http://www.google.com/recaptcha/api/verify';
...

Leave a Reply

Elements allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>