note 15690 added to function.gzopen
| From: | jeroenNOSPAM at dirck dot mine dot nu | Date: | Wed, 26 Sep 2001 17:59:43 +0000 |
| Subject: | note 15690 added to function.gzopen | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-18340@lists.php.net to get a copy of this message | ||
The above solution does not decompress on-the-fly. On-the-fly decompression isn't possible with
php's gzip, but this works as well:
<p>
<?php
$fname="http://something.big/movie.zip";
header("Content-type:application/octet-stream");
header("Content-Disposition: attachment; filename=\"movie.mpg\"");
passthru("lynx -source $fname | gunzip -c - ");
?>
</p>
This solution does of course imply you've got lynx and gunzip available, so it doesn't
work on Windows.
--
http://www.php.net/manual/en/function.gzopen.php
http://master.php.net/manage/user-notes.php?action=edit+15690
http://master.php.net/manage/user-notes.php?action=delete+15690
http://master.php.net/manage/user-notes.php?action=reject+15690