vividcortex / recaptcha-validator
A reCaptcha validator
Installs: 1 597
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 11
Forks: 0
Open Issues: 0
Requires
- php: >=5.4
- guzzlehttp/guzzle: ~5.2
Requires (Dev)
- phpspec/phpspec: ~2.1
Suggests
- google/recaptcha: This package has been deprecated in favor of Google's own recaptcha validator.
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.
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);