Hello Karl, Tuesday, February 24, 2004, 5:11:40 AM, you wrote:
KT> I am using fsockopen with fputs to send some headers to a HTTP server, KT> and I say I accept gzip encoding. The data gets returned and I put it KT> in a variable. However, whichever gzip command I try using in PHP to KT> decompress it (or is it deflate, or both?) returns an error. Is it KT> because the server send it back as hex possibly? (I sniffed the stream KT> and it was hex it looked like, I think). It will have sent it back as binary because that's the only possible way it can come back (assuming the server is sending it back correctly), hexidecimal characters are just a means to view that data, not the data type itself. I don't know enough about the gzip feature of servers to give you any suggestions, but it does occur to me that they probably encode each element on the page, not the whole thing at once, so I dare say you're being sent a stream of encoded data rather than one big gzip file. I might be wrong, but it makes sense if it does work like this. Perhaps someone else can confirm. -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php