wearesho-team/recaptcha-v3 问题修复 & 功能扩展

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

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

wearesho-team/recaptcha-v3

最新稳定版本:0.2.2

Composer 安装命令:

composer require wearesho-team/recaptcha-v3

包简介

reCAPTCHA v3 integration

README 文档

README

Latest Stable Version Total Downloads Build Status codecov License

Simple server check implementation for reCAPTCHA v3

Note: This is a Beta version of reCAPTCHA which is still undergoing final testing before its official release. The API, documentation, and policy are subject to change in the future.

Installation

composer require wearesho-team/recaptcha-v3

Usage

See example.php for details

<?php

use Wearesho\ReCaptcha;

$response = $_POST['g-recaptcha-response'];
$ip = $_SERVER['REMOTE_ADDR'] ?? null;

$config = new ReCaptcha\V3\Config($secret = "...");
$client = new ReCaptcha\V3\Client($config);

try {
    $response = $client->verify($response, $ip);
} catch (ReCaptcha\V3\Exception $e) {
    $response = $e->getResponse();
    // do something if token is not valid
}

$response->getScore(); // score from 0 to 1

Environment

Use EnvironmentConfig to configure application using environment. Keys:

  • RECAPTCHA_SECRET - secret, will be sent while verifying

Contributors

License

MIT

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-06-21

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固