Download the PHP package szmnmichalowski/zf2-nocaptcha without Composer
On this page you can find all versions of the php package szmnmichalowski/zf2-nocaptcha. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download szmnmichalowski/zf2-nocaptcha
More information about szmnmichalowski/zf2-nocaptcha
Files in szmnmichalowski/zf2-nocaptcha
Package zf2-nocaptcha
Short Description No CAPTCHA reCAPTCHA module for Zend Framework 2
License MIT
Homepage https://github.com/szmnmichalowski/ZF2-NoCaptcha
Informations about the package zf2-nocaptcha
NoCaptcha
NoCaptcha is a Zend Framework 2 module which is integrated with new version of Google reCAPTCHA.
More info about "No CAPTCHA reCAPTCHA"
Installation
You can install this module by cloning this project into your ./vendor/ directory, or using composer, which is more recommended:
1.
Add this project into your composer.json
2. Update your dependencies
3. Add module to your application.config.php
Usage
1. Add to layout.phtml in head section:
2.
Register your site at https://www.google.com/recaptcha/admin#createsite.
After you register your site you will get:
- Site key
- Secret key
Without this two keys, module won't work correctly
3. Pass these keys to \NoCaptcha\Captcha\ReCaptcha class
Example #1: Basic
In your form class:
Last step is to render captcha input in your view:
Example #2: Advanced
Or you can use setters
NoCaptcha uses Zend\Http\Client to verify if captcha is valid. If for some reasons you want to pass additional settings to Client class, you can do this by:
reCAPTCHA options
Theme:
- light (default)
- dark
Type:
- image (default)
- audio
Size:
- normal (default)
- compact
More information about options you can find at https://developers.google.com/recaptcha/docs/display