This package has been deprecated in favor of Google's own recaptcha validator.
A simple validator for Google's reCaptcha responses written in PHP.
Add your project requirement using composer.
composer require vividcortex/recaptcha-validator
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);