i'm trying to use reCaptcha v2.0 with php, in the server verification i use this code:
if(isset($_POST['Direccion_Email']) AND ($_POST['enviar'])) {
    if(isset($_POST['g-recaptcha-response'])){
    $mensaje_error = "";
    include 'config-formulario.php';
    require_once __DIR__ . '/recaptcha-master/src/autoload.php';
    $recaptcha = new \ReCaptcha\ReCaptcha($secret);
    $resp = $recaptcha->verify($_POST['g-recaptcha-response'], $_SERVER['REMOTE_ADDR']);
if (!$resp->isSuccess()) {
        $mensaje_error .= "Control Anti SPAM no es válido <br />";
        $errors = $resp->getErrorCodes();
    } else {
        //DO SOMETHING;
    }
But when i try to send a simple contact me form with name, email and comments, it's return this warnings:
Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed in /home/diego/www/systec/scripts/recaptcha-master/src/ReCaptcha/RequestMethod/Post.php on line 68
Warning: file_get_contents(): Failed to enable crypto in /home/diego/www/systec/scripts/recaptcha-master/src/ReCaptcha/RequestMethod/Post.php on line 68
Warning: file_get_contents(https://www.google.com/recaptcha/api/siteverify): failed to open stream: operation failed in /home/diego/www/systec/scripts/recaptcha-master/src/ReCaptcha/RequestMethod/Post.php on line 68
I'm testing this on localhost.
Any suggestions.
Thanks.
 
     
    