Created
August 19, 2015 03:42
-
-
Save shmurakami/0432be72eb31198f58d8 to your computer and use it in GitHub Desktop.
Get Contents of remote gzip file with PHP
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 | |
$context = stream_context_create([ | |
'http' => ['header' => 'Accept-Encoding: gzip'], | |
]); | |
$fp = fopen($outputUrl, 'rb', false, $context); | |
$prediction = gzdecode(stream_get_contents($fp)); | |
fclose($fp); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment