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