bhanwarpsrathore/recaptcha 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

bhanwarpsrathore/recaptcha

Composer 安装命令:

composer require bhanwarpsrathore/recaptcha

包简介

reCaptcha Plugin for cakephp 2

README 文档

README

Description

reCAPTCHA is a free CAPTCHA service that protect websites from spam and abuse.

#Usage First, register keys for your site at here

Then,To use the recaptcha plugin its required to include the following two lines in your /app/Config/bootstrap.php file.

Configure::write('Recaptcha.publicKey', 'public-api-key');
Configure::write('Recaptcha.privateKey', 'private-api-key');

Controllers that will be using recaptcha require the Recaptcha Component to be included. Through inclusion of the component, the helper is automatically made available to your views.

public $components = array('Recaptcha.Recaptcha');

In the view simply call the helpers display() method to render the recaptcha input:

echo $this->Recaptcha->display();

To check the result simply do something like this in your controller:

if ($this->request->is('post')) {
    if ($this->Recaptcha->verify()) {
        // verified
    } else {
        // display the error
    }
}

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2023-06-26