Skip to content
This repository was archived by the owner on Dec 16, 2020. It is now read-only.

VividCortex/php-recaptcha-validator

Repository files navigation

VividCortex reCaptcha Validator

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);

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages