johnson/yii2-pattern-captcha
Composer 安装命令:
composer require johnson/yii2-pattern-captcha
包简介
Yii2 pattern captcha is nine dots based pattern Captcha to match with the numbers given in the box
关键字:
README 文档
README
yii2-pattern-captcha is a extension for Yii Framework version above 2.0.0 and it's new version of captcha or puzzle to solve smaller problems in order to make the web application is accessed by human.
Steps to follow.
Install via composer
composer require johnson/yii2-pattern-captcha
Then In your form
<?=
JayPattern::widget([
'ajaxUrl' => 'http://localhost/yii2-basic/web/index/login',
'name' => 'pattern'
]);
?>
System will generate the dynamic numbers and the users need to draw pattern without releasing the mouse button!. Each single swipe or touch will be considered as pattern submission.
Parameters
- ajaxUrl - the verification call will be made to this URL
- name - the input field that will be amended in the widget. Later you can verify if the value of the input given by you has empty value then the captcha failed or if it has value as true then captcha has been passed.
The selector may be like this ===> input[name="< your-given-name >']
In your Controller
if (Yii::$app->request->isPost) {
$jp = new \Johnson\JayPattern();
echo json_encode($jp->verifyCode());
Yii::$app->end();
}
Please do your comments about improvements and other stuffs.
统计信息
- 总下载量: 19
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-06-14