note 19074 added to function.gzencode

From: Date: Thu, 14 Feb 2002 23:28:36 +0000
Subject: note 19074 added to function.gzencode
Groups: php.notes 
Request: Send a blank email to php-notes+get-26624@lists.php.net to get a copy of this message
Well, I was looking for a gzdecode too and didn't consider the temporary file example above to be very elegant. However, as is noted in the very first comment: gzencode() only adds a 10 byte header. I don't quite know what this header is supposed to be used for, but gzinflate() certainly doesn't like it, so I stripped it off: function my_gzdecode($string) { $string = substr($string, 10); return gzinflate($string); } That's useful to read HTTP-Connections that were compressed by mod_gzip. -- Henryk Plötz Grüße aus Berlin -- http://www.php.net/manual/en/function.gzencode.php http://master.php.net/manage/user-notes.php?action=edit+19074 http://master.php.net/manage/user-notes.php?action=delete+19074 http://master.php.net/manage/user-notes.php?action=reject+19074

« previous php.notes (#26624) next »