返回一片空白
$post_data="secret=Secret_key&response=".$_POST['g-recaptcha-response']."&remoteip=".$_SERVER['REMOTE_ADDR'] ;
$ch=curl_init();
curl_setopt($ch,CURLOPT_URL,"https://www.google.com/recaptcha/api/siteverify");
curl_setopt($ch,CURLOPT_POST,true);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch,CURLOPT_HTTPHEADER,array('Content-Type: application/x-www-form-urlencoded; charset=utf-8','Content-Length:'.strlen($post_data)));
curl_setopt($ch,CURLOPT_POSTFIELDS,$post_data);
$googresp=curl_exec($ch);
$decgoogresp=json_decode($googresp);
curl_close($ch);
p($decgoogresp);
1
iyuli 2017 年 6 月 26 日 via Android
有梯子不
|
2
tianxiacangshen OP @iyuli 有的,我是在网站上部署这个验证码,按照官方步骤部署的,按要求提交了 post,但是收不到返回数据,返回时一片空白
|
3
golmic 2017 年 6 月 26 日
你想破解掉 google 的验证码么? 5000 元求方案、、
|
4
tianxiacangshen OP @golmic 不是,我英文站上部署啊亲,从来没想过打谷歌的主意,靠谷歌吃饭呢
|
5
l12ab 2017 年 6 月 26 日
去掉 header 那一段试试
|
7
VgV 2017 年 6 月 27 日
不忍直视 header 那段
|
8
printempw 2017 年 6 月 27 日
状态码呢?
|
9
fffflyfish 2017 年 7 月 1 日
|
10
bixchen 2019 年 1 月 14 日
这么久过去了。想问一下你解决了没有。。
|