note 48586 deleted from function.gzcompress by nlopess
| From: | nlopess@php.net | Date: | Fri, 31 Dec 2004 11:36:45 +0000 |
| Subject: | note 48586 deleted from function.gzcompress by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-82499@lists.php.net to get a copy of this message | ||
Note Submitter: xtlan at interia.pl
----
Hello,
I wonder how can I append to source of page information about commpression size.
An example:
$output - contains page to compression
$size_before_compr=strlen($output);
$compressed_out = gzencode($output);
$size_after_compr=length($compressed_out);
$str_to_add="<!-- before: {$size_before_compr}B, after: {$size_after_compr}B -->";
//and here is question, how can I add also information stored in $str_to_add to compressed page
content (I mean add to $compressed_out) ???
header("Content-Encoding: gzip");
return $compressed_out;