Tweet, Share & Like [ EnAcCiOn ]

 

FeedBurner FeedCount Y Facebook | EnAcCiOn

Send Voicemail | EnAcCiOn

Contact me using vCita | EnAcCiOn

Contact me using vCita | EnAcCiOn

Meeting Scheduler Powered by vCita

martes, 11 de agosto de 2015

Urgent help...please...Recaptcha working smoothly on localhost, but when I upload it into a server it doesn't get the response from verify api

here is my code...and as I say it work perfectly while on localhost, but whenever I put the code on the webhosting..(I even try a second webhosting) it does not.. it keep telling me that the $response is empty so, therefore always get the captcha failure..   Please help.     /* CAPTCHA VALIDATION */ if(isset($_POST['g-recaptcha-response'])) {  $captcha=$_POST['g-recaptcha-response'];    }  if(!$captcha){  $isspammer = true;  header("location: http://".HOST_PATH._DS_.DIR_SUFFIX."index.php?error_code=4");    }     $secretkey="MY_SECRET_KEY"; $response=file_get_contents("http://bit.ly/1y6Ij36".$secretkey."&response=".$captcha."&remoteip=".$_SERVER['REMOTE_ADDR']);    $response = json_decode($response); if($response->success == false) {  session_destroy();  $isspammer = true;  header("location: http://".HOST_PATH._DS_.DIR_SUFFIX."index.php?error_code=5");    } else {  $isspammer = false; } -- You received this message because you are subscribed to the Google Groups "reCAPTCHA" group. To unsubscribe from this group and stop receiving emails from it, send an email to recaptcha+unsubscribe@googlegroups.com. To post to this group, send email to recaptcha@googlegroups.com. Visit this group at http://bit.ly/1dkFnYd. For more options, visit http://bit.ly/P65DvS.

No hay comentarios:

EnAcCiOn

Contador Web | EnAcCiOn

EnAcCiOn

EnAcCiOn

EnAcCiOn

Blog Archive | EnAcCiOn