2017 © Pedro Peláez
 

library recaptcha-v3

reCAPTCHA v3 integration

image

wearesho-team/recaptcha-v3

reCAPTCHA v3 integration

  • Friday, June 22, 2018
  • by Horat1us
  • Repository
  • 2 Watchers
  • 1 Stars
  • 31 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

reCAPTCHA v3 PHP Server Library

Latest Stable Version Total Downloads Build Status codecov License, (*1)

Simple server check implementation for reCAPTCHA v3, (*2)

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., (*3)

Installation

composer require wearesho-team/recaptcha-v3

Usage

See example.php for details, (*4)

<?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, (*5)

Contributors

License

MIT, (*6)

The Versions

22/06 2018

dev-master

9999999-dev

reCAPTCHA v3 integration

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Letnikow

22/06 2018

0.2.0

0.2.0.0

reCAPTCHA v3 integration

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Letnikow

21/06 2018

0.1.0

0.1.0.0

reCAPTCHA v3 integration

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Letnikow