HCAPTCHA_SECRETKEY, "response" => $_POST["h-captcha-response"])) ); curl_setopt($request, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($request); curl_close($request); $json = json_decode($response); if ($json->success) { $_SESSION["captcha_solved"] = true; header("Location: /"); exit; } } ?> Resolving a hCaptcha - <?php echo INSTANCE_NAME ?>