Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
$secret = 'ВАШ_СЕКРЕТНЫЙ_КЛЮЧ';
$params = array(
'secret' => $secret,
'response' => $_SESSION['recaptcha_token'],
);
$myCurl = curl_init();
curl_setopt_array($myCurl, array(
CURLOPT_URL => 'https://www.google.com/recaptcha/api/siteverify',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => http_build_query($params)
));
$response = curl_exec($myCurl);
curl_close($myCurl);
$response = json_decode($response, true);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.