验证码图像和卷曲 + php
$page = $curl->post($baseUrl.'/submit.php', array('url'=>$address,'phase'=>'1','randkey'=>$randKey[0],'id'=>'c_1'));
$exp = explode('recaptcha_image',$page);
尽管如果我 echo $page;
将会显示网页,但令人惊讶的是,即使是recpatcha div(带有图像本身),也找不到 id recaptcha_image。 Curl 不应该加载用于验证码的图像,但不知怎的,当我尝试找到 div 时,它不在那里。有没有办法捕获 recaptcha 图像的 url?
$page = $curl->post($baseUrl.'/submit.php', array('url'=>$address,'phase'=>'1','randkey'=>$randKey[0],'id'=>'c_1'));
$exp = explode('recaptcha_image',$page);
The id recaptcha_image is not found although if i echo $page;
the webpage will be displayed and surprisingly even the recpatcha div (with the image itself). Curl shouldn't load the image for recaptcha but somehow it does though when i try to find the div, it is not there. Is there a way to capture the url of the recaptcha image?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要使用像 PHP Simple HTML DOM Parser 这样的 HTML 解析器。
然后类似这样的事情就会起作用:
首先获取页面,解析它的脚本 URL,然后打开该 URL 进行挑战,然后将其附加到 URL 本身。图像将位于
$img
变量中。You'll want to use an HTML parser like this PHP Simple HTML DOM Parser.
Something like this will work then:
This first fetches the page, parses it for the script URL, then opens that URL for the challenge which is then appended to the URL itself. The image will be in the
$img
variable.