Decode gzip encoded content type text/xml with PHP?

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

Post Reply
lovelf
Forum Contributor
Posts: 153
Joined: Wed Nov 05, 2008 12:06 am

Decode gzip encoded content type text/xml with PHP?

Post 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/Š^>ãï¶( 
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

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

Post by John Cartwright »

gzipinflate() + gzipdeflate()

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