library g-recaptcha
Library agnostic to connect/valid Google Recaptcha in PHP projects
freddiegar/g-recaptcha
Library agnostic to connect/valid Google Recaptcha in PHP projects
- Wednesday, December 20, 2017
- by freddiegar
- Repository
- 1 Watchers
- 0 Stars
- 25 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 3 Versions
- 56 % Grown
Library agnostic to valid Google reCaptcha in PHP projects
Valid g-ReCaptcha 2.0 in your back-end project, (*1)
You can view details to back-end integration in docs, (*2)
Use example
$params = [
'secret' => 'YOUR_SECRET_FROM_RECAPTCHA',
'reCaptcha' => $_POST['g-recaptcha-response']
// Optional parameters
'userAgent' => 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.108 Safari/537.36'
'ipAddress' => '127.0.0.1',
];
try {
$captcha = new ReCaptcha2($params);
$request = $captcha->request();
if ($request->isValid()) {
// Dont is bot, ready!
} else {
$error = $captcha->getErrors();
}
} catch (Exception $exception) {
$error = $exception->getMessage();
}
Side Client
You can view details to front-end integration in docs, (*3)
dev-master
9999999-dev
Library agnostic to connect/valid Google Recaptcha in PHP projects
Sources
Download
MIT
The Requires
The Development Requires
1.0.0-beta.2
1.0.0.0-beta2
Library agnostic to connect/valid Google Recaptcha in PHP projects
Sources
Download
MIT
The Requires
The Development Requires
1.0.0-beta
1.0.0.0-beta
Library agnostic to connect/valid Google Recaptcha in PHP projects
Sources
Download
MIT
The Requires
The Development Requires