vividcortex/recaptcha-validator

This package is abandoned and no longer maintained. The author suggests using the google/recaptcha package instead.

A reCaptcha validator

v0.1.1 2016-02-05 18:51 UTC

This package is not auto-updated.

Last update: 2020-12-15 17:48:44 UTC


README

Deprecation notice

This package has been deprecated in favor of Google's own recaptcha validator.

A simple validator for Google's reCaptcha responses written in PHP.

Build status

Installation

Add your project requirement using composer.

composer require vividcortex/recaptcha-validator

How it works

First, you need to instantiate a new validator with your secret key provided by Google.

use VividCortex\RecaptchaValidator\Validator;

// ...

$validator = new Validator($secret);

Then, you can move on to validating responses. The response and the client's IP are required.

// Returns TRUE or FALSE
$result = $validator->validate($response, $clientIp);