PHP code example of xorock / zend-service-recaptcha-v2
1. Go to this page and download the library: Download xorock/zend-service-recaptcha-v2 library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
xorock / zend-service-recaptcha-v2 example snippets
use Zend\Form\Element\Captcha;
use ZfServiceReCaptcha2\Captcha\ReCaptcha2;
$this->add([
'type' => Captcha::class,
'name' => 'g-recaptcha-response', // name is => 'en', // english is set by deafult, this line is not ],
],
],
]);
use ZfServiceReCaptcha2\Form\Element\ReCaptcha2;
$this->add([
'type' => ReCaptcha2::class,
// Field name is defined by factory
// 'name' => 'g-recaptcha-response',
'options' => [
'label' => 'Please answer question',
],
]);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.