Page 1 of 1

Decode gzip encoded content type text/xml with PHP?

Posted: Thu Dec 03, 2009 9:33 pm
by lovelf
How to decode gzip encoded content type text/xml with PHP?

Code: Select all

HTTP/1.0 200 OK
Content-Type: text/xml
Content-Length: 208
Content-Encoding: gzip
 
‹µ’=Â0†çú+ÄÝ&MUl‰µÅê`U\9%¤F¿ýrŠ‹º½<ǽÏpG¹RLóT6ê94ͯB÷•R³7(Y·û`Jbìñ&ŽWŠž“r³ÉUZƒÃd¢/ybAµÕ^1‡î˜‚(s3çÜ@QPT³zzbò‘‡]‚Ý1v=2¢¨aU!zÓøÁ²´ý·%³Ì؃PÐ5àòÂÁû¡OÂñ7š¥æ¿‘tXs/Š^>ãï¶( 

Re: Decode gzip encoded content type text/xml with PHP?

Posted: Thu Dec 03, 2009 9:41 pm
by John Cartwright
gzipinflate() + gzipdeflate()

However, I would recommend using a library that handles this transparantly, such as cURL.