PHP code example of siezi / cakephp-simple-captcha
1. Go to this page and download the library: Download siezi/cakephp-simple-captcha 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/ */
siezi / cakephp-simple-captcha example snippets
composer
$this->addPlugin(\Siezi\SimpleCaptcha\Plugin::class);
$this->loadHelper('Siezi/SimpleCaptcha.SimpleCaptcha');
echo $this->SimpleCaptcha->control();
$validator = new \Siezi\SimpleCaptcha\Model\Validation\SimpleCaptchaValidator();
$errors = $validator->validate($this->request->getData());
$yourUserEntity->setErrors($errors);