这段 reCAPTCHA 完全没错啊,为什么总是获取不到谷歌返回的数据

2017-06-26 20:41:28 +08:00
 tianxiacangshen

返回一片空白

$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);

3464 次点击
所在节点    PHP
10 条回复
iyuli
2017-06-26 20:48:07 +08:00
有梯子不
tianxiacangshen
2017-06-26 20:49:04 +08:00
@iyuli 有的,我是在网站上部署这个验证码,按照官方步骤部署的,按要求提交了 post,但是收不到返回数据,返回时一片空白
golmic
2017-06-26 20:59:22 +08:00
你想破解掉 google 的验证码么? 5000 元求方案、、
tianxiacangshen
2017-06-26 21:02:19 +08:00
@golmic 不是,我英文站上部署啊亲,从来没想过打谷歌的主意,靠谷歌吃饭呢
l12ab
2017-06-26 22:37:45 +08:00
去掉 header 那一段试试
knightdf
2017-06-27 11:52:52 +08:00
@golmic 曾经有人用语音识别破解,不知道现在还可行不
VgV
2017-06-27 12:16:42 +08:00
不忍直视 header 那段
printempw
2017-06-27 17:35:24 +08:00
状态码呢?
fffflyfish
2017-07-01 16:05:41 +08:00
@golmic @knightdf
呐,你们要的谷歌验证码破解方案 ![]( http://gmp4.dwstatic.com/1726/8882817845.mp4)
bixchen
2019-01-14 11:03:02 +08:00
这么久过去了。想问一下你解决了没有。。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/371223

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX