PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
lovelf
Forum Contributor
Posts: 153 Joined: Wed Nov 05, 2008 12:06 am
Post
by lovelf » Thu Dec 03, 2009 9:33 pm
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/Š^>ãï¶(
John Cartwright
Site Admin
Posts: 11470 Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:
Post
by John Cartwright » Thu Dec 03, 2009 9:41 pm
gzipinflate() + gzipdeflate()
However, I would recommend using a library that handles this transparantly, such as cURL.