vantolini / recaptcha
A tidied up version of ReCaptcha for PHP
This package's canonical repository appears to be gone and the package has been frozen as a result.
Installs: 3 796
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2019-04-29 04:17:52 UTC
README
A tidied up version of ReCaptcha for PHP
Show the captcha
echo ReCaptcha::recaptcha_get_html(PUBLIC_KEY);
Validate the captcha
$response = ReCaptcha::recaptcha_check_answer(
PRIVATE_KEY,
$_SERVER['REMOTE_ADDR'],
$_REQUEST['challenge_field'],
$_REQUEST['response_field']
);
if (!$response->is_valid) {
echo 'FAILED';
}else{
echo 'OK';
}