1. Go to this page and download the library: Download simialbi/yii2-visualcaptcha 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/ */
namespace app\models;
use simialbi\yii2\visualcaptcha\validators\VisualCaptchaValidator;
use yii\base\Model;
class MyForm extends Model {
public $name;
public $email;
public $subject;
public $body;
public $verifyCode;
/**
* {@inheritdoc}
*/
public function rules() {
return [
[['name', 'email', 'subject', 'body', 'verifyCode'], '
use simialbi\yii2\visualcaptcha\widgets\VisualCaptcha;
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model app\models\MyForm */
$this->title = 'Visual Captcha';
$this->params['breadcrumbs'][] = $this->title;
$ php composer.phar
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.