News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Wojciech Sznapka's Blog:
Power of PHP streams - decompress gz archives on the fly from remote server
November 24, 2010 @ 08:39:05

Wojciech Sznapka has a new post to his blog today looking at the "power of PHP streams" and how they can be used to decompress gzipped data from remote servers.

Probably most of us heard about streams in PHP. They are background of all files and network operations in PHP, even if we don't see it. Everytime when you use file_get_contents or fopen you are actually using streams. But there are many stream wrappers I haven't used, because they aren't well known.One of them is compress.zlib (and two other compression stream filters).

He includes a quick example (because, thankfully, that's all working with streams like this usually requires) about pulling in a file from his server and uses the stream to fetch and unzip the data to display the contents.

0 comments voice your opinion now!
streams tutorial gzip decompress archive


blog comments powered by Disqus

Similar Posts

HowToForge: How To Install a Complete LEMP on Ubuntu/Debian

Aaron Pollock: Setting up a PHP development environment on a VPS

PurpleRockScissors.com: Avoiding Cache Stampedes with Pseudo-Locks

Matthew Weir O'Phinney's Blog: Cgiapp2 Tutorial 2 - Pluggable Applications

DevShed: Using Static Methods to Validate Data with Helpers in PHP 5


Community Events

Don't see your event here?
Let us know!


podcast composer introduction laravel symfony2 application library performance series release part2 api conference example framework configure community interview opinion php7

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework