0
0
Read Time:21 Second
function getCaptchaGoogle(){
$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, 'secret=6Lcv9YEaAAAAAAgfqv9zfwLcgknsWnLEzSLq3_N3&response='.$_REQUEST['resp']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$server_output = curl_exec($ch);
curl_close($ch);
echo $server_output;
die();
}
add_action('wp_ajax_getCaptchaGoogle', 'getCaptchaGoogle');
add_action('wp_ajax_nopriv_getCaptchaGoogle', 'getCaptchaGoogle');