How to pass a value from PHP to nginx? The problem with Recaptcha?








if(isset($_POST['g-recaptcha-response'])){
// Send data and get response
$cap = $_POST['g-recaptcha-response'];
$ch = curl_init('https://www.google.com/recaptcha/api/siteverify?se...'.$cap);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
curl_close($ch);
header ('location : /verify');
exit;
print_r($result);
}
var_dump($result);

?>

June 8th 19 at 16:48
0 answer

Find more questions by tags PHPNginxGooglereCAPTCHA