如题所述
用到的curl的两个参数:
//在http 请求头加入 gzip压缩
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Accept-Encoding:gzip'));
//curl返回的结果,采用gzip解压
curl_setopt($ch, CURLOPT_ENCODING, "gzip");
//在http 请求头加入 gzip压缩
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Accept-Encoding:gzip'));
//curl返回的结果,采用gzip解压
curl_setopt($ch, CURLOPT_ENCODING, "gzip");
温馨提示:答案为网友推荐,仅供参考