23/06
2018
Wallogit.com
2017 © Pedro Peláez
reCaptcha 2.0
Google reCaptcha 2.0 for PHP, (*1)
composer require skillaug/re-captcha "1.0.0"
$secret = 'YOUR_SECRET';
$reCaptcha = new \skillaug\reCaptcha( $secret );
$response = $reCaptcha->verifyResponse(@$_POST["g-recaptcha-response"]);
if ( empty( $response ) || $response->success === false ) {
die('invalid captcha');
}