PHP code example of lubosdz / yii2-captcha-extended

1. Go to this page and download the library: Download lubosdz/yii2-captcha-extended 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/ */

    

lubosdz / yii2-captcha-extended example snippets



public function actions()
{
	return [
		'captcha' => [
			'class' => 'lubosdz\captchaExtended\CaptchaExtendedAction',
			// optionally, set mode and obfuscation properties e.g.:
			'mode' => 'math',
			//'mode' => CaptchaExtendedAction::MODE_MATH,
			//'resultMultiplier' => 5,
			//'lines' => 5,
			//'density' => 10,
			//'height' => 50,
			//'width' => 150,
		],
	];
}



public $verifyCode;

public function rules()
{
	return [
		['verifyCode', 'lubosdz\captchaExtended\CaptchaExtendedValidator',
			'captchaAction' => Url::to('/site/captcha'),
		],
	];
}



 $form = ActiveForm::begin()