【发布时间】:2017-02-19 13:20:08
【问题描述】:
我对 google reCaptcha 有疑问。
这是我的 php 代码:
$secret = 'SECRET_KEY';
$response = $_POST['g-recaptcha-respone'];
$remoteip = $_SERVER['REMOTE_ADDR'];
$url = "https://www.google.com/recaptcha/api/siteverify?secret=$secret&response=$response&remoteip=$remoteip";
$result_json = file_get_contents($url);
$resulting = json_decode($result_json, true);
print_r($resulting);
if($resulting['success']) {
//Success
}
print_r 的输入为:Array ( [success] => [error-codes] => Array ( [0] => missing-input-response ) )
如何解决这个问题?
感谢解答
【问题讨论】: