creative-delta/recaptcha

A PHP ZendFramework 2.0 (ZF2) - Google ReCAPTCHA Adapter

Installs: 16

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/creative-delta/recaptcha

dev-master 2016-09-16 06:03 UTC

This package is not auto-updated.

Last update: 2025-10-12 01:24:08 UTC


README

A PHP ZF2 - ReCAPTCHA Adapter (Google)

This recaptcha class is used as an adapter to ZF2 default CAPTCHA form element. It provides both form validation and element view rendering.

Two major inputs are a public key and a private key. The public key is the site key, while the private key is the secret. Both keys are acquired from Google.

An example code is as below:

        $reCaptcha = new CDReCaptcha(); // This recaptcha class (CDReCaptcha is an alias to ReCaptcha)
        $reCaptcha->setPublicKey($publicKey);
        $reCaptcha->setPrivateKey($privateKey);
        $captchaElement = new Captcha('g-recaptcha-response');
        $captchaElement->setCaptcha($reCaptcha);

(The $captchaElement is then added to a form object)

If you need assistance or further improvement of this package, feel free to email me at ducanh.ke@gmail.com