Created
November 23, 2010 21:45
-
-
Save wowo/712600 to your computer and use it in GitHub Desktop.
Decompresses gz archives on the fly while downloading from remote server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$path = "http://sznapka.pl/myarchive.gz"; | |
$data = file_get_contents("compress.zlib://" . $path); | |
printf("Got from %s archive such content:\n%s", $path, trim($data)); | |
// prints: | |
// Got from http://sznapka.pl/myarchive.gz archive such content: | |
// Hi, I'm gz-ipped and you can ungzip me and download on the fly :-) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment