Skip to content

strawbrary/php-oop-recaptcha

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP Object-Oriented reCAPTCHA

The PHP reCAPTCHA library encapsulated in a class to simplify usage with frameworks that support autoloading.

Generating Captcha

$recaptcha = new Recaptcha($publicKey, $privateKey);
$recaptcha->get_html();

Validating Response

$recaptcha = new Recaptcha($publicKey, $privateKey);
$response = $recaptcha->check_answer($_SERVER['REMOTE_ADDR'], $_POST['recaptcha_challenge_field'], $_POST['recaptcha_response_field']);

if ($response->is_valid) {
	// Captcha was completed successfully
} else {
	// Captcha was not completed successfully
}

The reCAPTCHA PHP Lirary helps you use the reCAPTCHA API. Documentation for this library can be found at

http://recaptcha.net/plugins/php

About

PHP reCAPTCHA library encapsulated in an object for autoloading

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages