News Feed
Jobs Feed
Sections



Recent Jobs

News Archive
Sameer Borate's Blog:
Creating custom stream filters
June 17, 2009 @ 07:56:28

In a new post to his blog Sameer takes a look at streams and filters in PHP applications, specifically how to set up a custom filter to attach to any stream.

In this post we will see how to create a custom stream filter. Streams, first introduced in PHP 4.3, provide an abstration layer for file access. A number of different resources besides files - like network connections, compression protocols etc. can be regarded as "streams" of data which can be serially read and written to.

Streams are the method "behind the scenes" for several of the PHP functions you already use (like fsockopen and file_get_contents). His example shows you how you can manually create a stream and attach a filter to it to replace URLs in the contents of the stream with the "[---URL---]" string and push it back to the standard output.

0 comments voice your opinion now!
filter custom tutorial stream



Similar Posts

Chris Shiflett's Blog: OSCON 2006 Redux

IBM developerWorks: Cook up Web sites fast w/CakePHP, Part 1: Adding related information & services

DevShed: Filtering Image Streams with the GD Library in PHP

Stefan Mischook's Blog: Turning on display_errors in WAMP - Video Tutorial

Pádraic Brady's Blog: RESTful Web Services with Zend Framework


Community Events

phpnw10 PHP Conference 09/10/2010




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


opinion unittest application framework developer screencast curl example suggestion zendframework azure phpunit introduction codeigniter development conference wordpress book plugin database

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