有谁知道如何解压缩我用curl 获得的gzip 文件的内容?
例如:http://torcache.com/torrent/63ABC1435AA5CD48DCD866C6F7D5E80766034391.torrent http://torcache.com/torrent/63ABC1435AA5CD48DCD866C6F7D5E80766034391.torrent
回应了
HTTP/1.1 200 OK
Server: nginx
Date: Wed, 09 Jun 2010 01:11:26 GMT
Content-Type: application/x-bittorrent
Content-Length: 52712
Last-Modified: Tue, 08 Jun 2010 15:09:58 GMT
Connection: keep-alive
Expires: Fri, 09 Jul 2010 01:11:26 GMT
Cache-Control: max-age=2592000
Content-Encoding: gzip
Accept-Ranges: bytes
然后压缩gzip,
我尝试了 gzdecode 但不起作用,gzeflate 也没有得到任何响应,并且文件的内容不超过 2k
只要告诉 cURL 在 gzip 压缩时自动解码响应即可
curl_setopt($ch,CURLOPT_ENCODING, '');
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)