post->usuario && $input->post->contrasinal) { $user = $sanitizer->username($input->post->usuario); $pass = $input->post->contrasinal; } $token = $input->post->token; $action = $input->post->action; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,"https://www.google.com/recaptcha/api/siteverify"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(array('secret' => RECAPTCHA_V3_SECRET_KEY, 'response' => $token))); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $arrResponse = json_decode($response, true); if($arrResponse["success"] == '1' && $arrResponse["action"] == $action && $arrResponse["score"] >= 0.5) { if($session->login($user, $pass)) { $session->redirect($page->parent->httpUrl); } else { $mensaxe_tipo = "erro"; $mensaxe = _x('Wrong username or password', 'Wrong username or password'); } } else { $mensaxe_tipo = "alerta"; $mensaxe = _x('Wrong reCaptcha', 'Wrong reCaptcha'); } ?> <?php echo $titulo; ?>

post->usuario): ?>