CURL?取到验证码乱码了解决方法

WBOY
Release: 2016-06-13 12:11:45
Original
894 people have browsed it

CURL?取到验证码乱码了
网页打开时正常显示验证码的,但是用chrome看到的反回和 curl都是乱码 这是这么回事
附上  
http://dlpa.dl.gov.cn/zzb/authImg
------解决思路----------------------
你没有设置 CURLOPT_RETURNTRANSFER 属性
$image=curl_exec($ch); 不会得到正确的值

$cookieJar=tempnam('tmp', cookieJar);
是局部变量,获取到的 cookie 不能被共享。虽然对于仅读取图片没有影响
------解决思路----------------------
解决了吗?没解决的话 可以给你发一下我写的curl

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template