note 8750 deleted from function.gzcompress by didou

From: Date: Fri, 14 Jan 2005 01:22:49 +0000
Subject: note 8750 deleted from function.gzcompress by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-83232@lists.php.net to get a copy of this message
Note Submitter: ck at medienkombinat dot de ---- gzcompress DOES return gz compressed data. The only thing you still need is the GZ header before any gz compressed output (0x1F 0x8B 0x08 0x00 0x00 0x00 0x00 0x00 0x00). Here is a working example for buffered gz output: <?php Header("Content-Encoding: gzip"); echo "\x1f\x8b\x08\x00\x00\x00\x00\x00"; flush(); ob_start(); ob_implicit_flush(0); // output something, like include("/etc/rc.config"); // end of output $x = ob_get_contents(); ob_end_clean(); echo gzcompress($x,9); ?>

« previous php.notes (#83232) next »