Pat gream

Forum Replies Created

Viewing 1 post (of 1 total)
in reply to: ReCptach failed with 2.8.99 #48068

Pat gream
Member

Hi Jass,

I am sorry, i have no access to FW and it limit admin to 2 adresses. I found a work around, it seems to come from remote_post and decode response, I replace by the code bellow and it works fine :

if(isset($_POST[‘reCaptchaVerify’])){
$retraw=file_get_contents(“https://www.google.com/recaptcha/api/siteverify?secret=”.get_option(‘_wpdm_recaptcha_secret_key’).”&response=”.$_POST[‘reCaptchaVerify’].”&remoteip=”.$_SERVER[‘REMOTE_ADDR’]);
$ret = json_decode($retraw,true);

// $ret = remote_post(‘https://www.google.com/recaptcha/api/siteverify’, array(‘secret’ ► get_option(‘_wpdm_recaptcha_secret_key’), ‘response’ ► $_POST[‘reCaptchaVerify’], ‘remoteip’ ► $_SERVER[‘REMOTE_ADDR’]));

if($ret[“success”] == true){
$_SESSION[‘_wpdm_unlocked_’.$file[‘ID’ = 1;
update_post_meta($file[‘ID’], “__wpdmkey_”.$key, 3);
$download_url = wpdm_download_url($file, “_wpdmkey={$key}”);
$data[‘downloadurl’] = $download_url;
}
else{
$data[‘error’] = __(“Captcha Verification Failed!”, “wpmdpro”);
}

Thks for your plugin,

Payt

Viewing 1 post (of 1 total)