Home > Backend Development > PHP Tutorial > curl抓取乱码

curl抓取乱码

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-23 13:52:00
Original
981 people have browsed it

用浏览区访问以下获取正常

curl获取乱码

改变浏览器编码不起作用(从一种乱码变成另外一种乱码)

代码如下


有人知道什么原因吗?


回复讨论(解决方案)

echo base64_encode($response);
贴出结果

已经解决了,返回的是gzip  curl 加一个 curl_setopt($ch,CURLOPT_ENCODING ,'gzip'); 就好了

Related labels:
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
Latest Issues
curl simulated login
From 1970-01-01 08:00:00
0
0
0
Convert cURL command line to PHP cURL code
From 1970-01-01 08:00:00
0
0
0
Convert command line cURL to PHP cURL
From 1970-01-01 08:00:00
0
0
0
How to set boolean value true in php curl
From 1970-01-01 08:00:00
0
0
0
Please tell me, php curl request page shows blank
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template