我有一個驗證碼發送電子郵件的形式,一切工作,當我使用我的ReCaptcha FAQ找到試驗場密鑰和祕密密鑰 recaptcha faq的Recaptcha POST不工作,我的祕密密鑰
但當我插入我的它不起作用,我也試圖重新創建密鑰,但問題仍然存在...任何建議? 這是我的PHP代碼:
<?php
$response = file_get_contents('https://www.google.com/recaptcha/api/siteverify?secret=MY_SECRET_KEY&response='.$_POST['g-recaptcha-response'].'&remoteip='.$_SERVER['REMOTE_ADDR']);
$responseDecoded = json_decode($response);
if ($responseDecoded->success == false) {
echo 'Busted!';
exit();
}
else{
//here I insert the code for sending email
}
?>
什麼錯誤後/你的問題 – kranthi
我會確認,如果你可以file_get_contents其他SSL/HTTPS鏈接(思考openssl問題) – Scuzzy
你有沒有得到任何錯誤? –