承接 htmlwebfan/nocaptcha 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

htmlwebfan/nocaptcha

Composer 安装命令:

composer require htmlwebfan/nocaptcha

包简介

Generates and verifies a NoCaptcha field in forms HTML forms with PHP.

README 文档

README

Latest Version Software License

Are you a robot? Introducing "No Captcha reCaptcha".

This PHP package allows you to render a form field in a form and then verify the response from Google on your server. The package supports psr-4.

reCAPTCHA from Google

Install

To get the latest version of nocaptcha simply require it in your composer.json file.

"htmlwebfan/nocaptcha": "dev-master"

You'll then need to run composer install to download it and have the autoloader updated.

Usage

Overview

  1. Configure NoCaptcha
  2. Display the nocaptcha filed on the form
  3. When the form is posted to your processor script, verify that the nocaptcha response is valid

Configure

Open the Config.php file and set the constants with the the sitekey and the secret values you got from Google Google

Display

// form_page.php

// Instantiate a NoCaptcha object and initialize it with the Config 
// object containing your keys
$nb = new NoCaptcha(new Config);  

// Generate the HTML code for your nocaptcha form field
$nb->generateField();

// When the user successfully completes the turing test, Google will set a 
// g-recaptcha-response on your form that will be posted to your processing script

Verify captcha from the server

// processor_script.php

// The value Google gave you on the form when the user completed the test
$r = $_POST['g-recaptcha-response']; 

// Do not forget to filter your input here, I have not done so here in order 
// to keep the example simple
$em = $_POST['email'];

$nobot = new NoCaptcha(new Config);
$nobot->setResponse($r);
$v = $nobot->verify();

// verify() returns a stdCalss Object with a success property with a value of 1
// Any other value means the verification failed. The class has a debug() method 
// for troubleshooting failures like so:

$nobot->debug()

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email nocaptcha@htmlwebfan.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

htmlwebfan/nocaptcha 适用场景与选型建议

htmlwebfan/nocaptcha 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 28 次下载、GitHub Stars 达 2, 最近一次更新时间为 2015 年 03 月 17 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「form」 「recaptcha」 「html」 「spam」 「antispam」 「robot」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 htmlwebfan/nocaptcha 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 htmlwebfan/nocaptcha 我们能提供哪些服务?
定制开发 / 二次开发

基于 htmlwebfan/nocaptcha 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

  • Stars: 2
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-03-17