<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Sat, 25 May 2013 10:50:58 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Wojciech Sznapka's Blog: Power of PHP streams - decompress gz archives on the fly from remote server]]></title>
      <guid>http://www.phpdeveloper.org/news/15482</guid>
      <link>http://www.phpdeveloper.org/news/15482</link>
      <description><![CDATA[<p>
<i>Wojciech Sznapka</i> has <a href="http://blog.sznapka.pl/power-of-the-php-streams-decompress-gz-archives-on-the-fly-from-remote-server/">a new post to his blog</a> today looking at the "power of PHP streams" and how they can be used to decompress gzipped data from remote servers.
</p>
<blockquote>
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 <a href="http://www.php.net/manual/en/wrappers.compression.php">compression stream filters</a>). 
</blockquote>
<p>
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.
</p>]]></description>
      <pubDate>Wed, 24 Nov 2010 08:39:05 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Kevin Schroeder's Blog: You want to do WHAT with PHP? Chapter 4]]></title>
      <guid>http://www.phpdeveloper.org/news/15068</guid>
      <link>http://www.phpdeveloper.org/news/15068</link>
      <description><![CDATA[<p>
<i>Kevin Schroeder</i> has <a href="http://www.eschrade.com/page/want-what-with-chapter-4c7e5ff1">another new post</a> to his blog today with an excerpt from his "You Want to Do WHAT with PHP?" book. This new post is a section from the fourth chapter looking at stream handling.
</p>
<blockquote>
Communication is key to building applications now and for the future.  While it is not something that I think that everyone should do, I have not seem many applications that make good use of streams in PHP.  Streams can be immensely useful in the right situations, but a lot of developers are not really aware of how streams can be used. [...] While I don't think you will end up basing your application around streams it is a really good idea to know how streams work.
</blockquote>
<p>
The sample code (and description) talk about changing the properties of a stream on the fly. He shows how, with a <a href="http://php.net/fgets">fgets</a> loop checking the input, he can catch a command from the already running script and change the compression setting on the currently open stream. The compression changes the stream's data from plain text to a binary format as handled by the streams functionality.
</p>]]></description>
      <pubDate>Thu, 02 Sep 2010 13:49:23 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Davey Shafik's Blog: Avoiding EVAL()]]></title>
      <guid>http://www.phpdeveloper.org/news/11857</guid>
      <link>http://www.phpdeveloper.org/news/11857</link>
      <description><![CDATA[<p>
<i>Davey Shafik</i> has a <a href="http://pixelated-dreams.com/archives/232-avoiding-eval.html">helpful hint</a> for avoiding one of the worst functions to use in PHP - <a href="http://php.net/eval">eval</a>.
</p>
<blockquote>
There are a shed-load of ways to "eval()" code without actually calling the eval() function '" usually done simply to avoid the use of the dreaded "evil()" function, but often times because the system has eval() disabled using "disable_functions" in php.ini. Here is another simple way to avoid eval() without writing out files to the filesystem
</blockquote>
<p>
His example uses the streams wrapper to natively execute the code from a string variable as a data element, base64 decoded. It's more of a proof-of-concept than anything else, but its an interesting solution to a tough problem to solve at times.
</p>]]></description>
      <pubDate>Mon, 02 Feb 2009 11:15:24 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Matthew Turland's Blog: Benchmarking PHP HTTP Clients]]></title>
      <guid>http://www.phpdeveloper.org/news/11443</guid>
      <link>http://www.phpdeveloper.org/news/11443</link>
      <description><![CDATA[<p>
<i>Matthew Turland</i> has <a href="http://ishouldbecoding.com/2008/11/23/benchmarking-php-http-clients">this new blog post</a> looking at some benchmarks he's generated for a group of mainstream PHP HTTP clients:
</p>
<blockquote>
One of the interesting bits of research that I've done is benchmarking various mainstream PHP HTTP clients. Of course, we all know that there are <a href="http://en.wikipedia.org/wiki/Lies,_damned_lies,_and_statistics">lies, damned lies, statistics, and benchmarks</a>, so take these with a grain of salt. 
</blockquote>
<p>
He ran them on his Sony Viao on Ubuntu with a stock PHP5 package. The tested packages were the pecl_http extension, the streams http wrapper, curl integration into PHP 5, PEAR::HTTP Client class and the Zend_Http_Client component. He includes the code he used for both a basic request and for something slightly more complex (posting form data). He used the XDebug and KCachegrind combination to produce the results.
</p>]]></description>
      <pubDate>Mon, 24 Nov 2008 07:56:30 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Davey Shafik's Blog: PHP Streams Book (Coming soon!)]]></title>
      <guid>http://www.phpdeveloper.org/news/10043</guid>
      <link>http://www.phpdeveloper.org/news/10043</link>
      <description><![CDATA[<p>
We can expect <a href="http://pixelated-dreams.com/archives/351-PHP-Streams-Book-Coming-soon!.html">big things</a> from <i>Davey Shafik</i> in the coming months - he's been working on a book for <a href="http://www.phparch.com">php|architect</a> about one of the more powerful bits of functionality in PHP - streams.
</p>
<blockquote>
For about 6 months now, I've been itching to write a book on the PHP Streams Layer - one of my favorite features of PHP; and also one of the least known considering it's powerful abilities.
</blockquote>
<p>
He describes his goal simply as this: to create the definitive resource for working with the streams later in PHP. It should be out sometime in the third quarter of 2008, so keep your eye out for it then.
</p>]]></description>
      <pubDate>Fri, 25 Apr 2008 12:04:09 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Matthew Turland's Blog: Interesting Bug in the HTTP Streams Wrapper]]></title>
      <guid>http://www.phpdeveloper.org/news/9965</guid>
      <link>http://www.phpdeveloper.org/news/9965</link>
      <description><![CDATA[<p>
<i>Matthew Turland</i> has come across an <a href="http://ishouldbecoding.com/2008/04/10/interesting-bug-in-the-http-streams-wrapper">"interesting bug"</a> in PHP's stream wrappers functionality - some strange 404 or 500 HTTP errors in one of his scripts.
</p>
<blockquote>
I wrote a <a href="http://ishouldbecoding.com/2008/04/user/files/pastebin.phps">small script</a> a while back that's gained a surprising amount of popularity thanks to a plug from the site that it posts to. [...] I learned that this [connection from the script] could be done with streams, I attempted to implement it in that fashion, but ran into strange issues where I would get 404 or 500-level HTTP errors rather than the response I was expected.
</blockquote>
<p>
He eventually found <a href="http://bugs.php.net/bug.php?id=44603">the bug</a> related to his problem (in the 5.2.x branch) but happily notes that it has been corrected and will be patched in the upcoming 5.3 (and 6) branches.
</p>]]></description>
      <pubDate>Mon, 14 Apr 2008 08:49:04 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPClasses.org: A PHP killer feature - Streams abstraction]]></title>
      <guid>http://www.phpdeveloper.org/news/9552</guid>
      <link>http://www.phpdeveloper.org/news/9552</link>
      <description><![CDATA[<p>
On the PHPClasses.org website there's a <a href="http://www.phpclasses.org/blog/post/74-A-PHP-killer-feature--Streams-abstraction.html">new entry</a> covering, among other things, one handy feature PHP includes to let developers read and write their data more flexibly - <a href="http://us.php.net/stream">streams</a>.
</p>
<blockquote>
This article explains what are stream handlers and how they simplify PHP developers lives by allowing PHP applications to easily read and write data from containers, like remote Web pages or e-mail messages, as if they were files. [...] The article also presents more examples of cool stream handlers classes submitted to the PHPClasses site by several authors.
</blockquote>
<p>
He <a href="http://www.phpclasses.org/blog/post/74-A-PHP-killer-feature--Streams-abstraction.html">describes</a> the abstraction that the streams interface allows, how they can make your life easier, a real-life example of streams in action (working with POP3) and some of the classes that have been contributed to PHPClasses.org that use them.
</p>]]></description>
      <pubDate>Fri, 01 Feb 2008 15:36:24 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Zend Developer Zone: PHP Abstract Podcast Episode 34: Streams Abstraction]]></title>
      <guid>http://www.phpdeveloper.org/news/9542</guid>
      <link>http://www.phpdeveloper.org/news/9542</link>
      <description><![CDATA[<p>
The Zend Developer Zone has posted <a href="http://devzone.zend.com/article/3049-PHP-Abstract-Podcast-Episode-34-Streams-Abstraction">episode 34</a> of their PHP Abstract podcast series from <i>Manuel Lemos</i> covering the abstraction of steams in a PHP application.
</p>
<blockquote>
Today's special guest is Manuel Lemos of phpclasses.org Manuel is from Portugal and currently lives in Brazil where he works full-time on PHPClasses.org that he created in 1999. Today, Maunel is going to talk to us about Streams Abstraction.
</blockquote>
<p>
Grab it in one of the usual three ways - <a href="http://devzone.zend.com/article/3049-PHP-Abstract-Podcast-Episode-34-Streams-Abstraction">listen on the page</a>, download the <a href="http://s3.amazonaws.com/php.abstract.2008/php_abstract_episode_034.mp3">mp3</a> or subscribe to <a href="http://feeds.feedburner.com/phpabstract">feed</a> for the show. Also, be sure to check out some of the other episodes listed <a href="http://devzone.zend.com/article/3049-PHP-Abstract-Podcast-Episode-34-Streams-Abstraction">at the bottom</a> of the post for lots of other great content.
</p>]]></description>
      <pubDate>Fri, 01 Feb 2008 08:33:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Ligaya Turmelle's Blog: Streams Gem]]></title>
      <guid>http://www.phpdeveloper.org/news/8669</guid>
      <link>http://www.phpdeveloper.org/news/8669</link>
      <description><![CDATA[<p>
<i>Ligaya Turmelle</i> shine up and shows off a streams gem that she rediscovered - a simple method of sending a POST request and getting it's response:
</p>
<blockquote>
Was reminded today of a gem from the streams extension - sending a POST message and getting its results. We could do it using cURL or sockets - but why work that hard. Being lazy does have its advantages after all.
</blockquote>
<p>
The <a href="http://www.khankennels.com/blog/index.php/archives/2007/09/17/streams-gem/">example she includes</a> is one from the manual, showing how to take the array of data and push it out to the remote site with a few simple calls (including stream_context_create).
</p>]]></description>
      <pubDate>Mon, 17 Sep 2007 19:05:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Davey Shafik's Blog: PHP Streams Rock my World!]]></title>
      <guid>http://www.phpdeveloper.org/news/8641</guid>
      <link>http://www.phpdeveloper.org/news/8641</link>
      <description><![CDATA[<p>
<i>Davey Shafik</i> has gotten <a href="http://pixelated-dreams.com/archives/319-PHP-Streams-Rock-my-World!.html">more than a little excited</a> by the streams functionality in his latest blog post:
</p>
<blockquote>
PHP streams are absolutely amazing. As mentioned by Elizabeth Smith (a great read if you don't know how to use streams) PHP streams are super powerful. Streams is something that is (to my knowledge) unique to PHP. The closest thing I've seen to it, is Linux's FUSE "user space" (i.e. not kernel module) file systems.
</blockquote>
<p>
He <a href="http://pixelated-dreams.com/archives/319-PHP-Streams-Rock-my-World!.html">shows an example</a> of a stream in action and suggests an interface he'd like to see - an automatic connection to the Amazon S3 storage.
</p>]]></description>
      <pubDate>Wed, 12 Sep 2007 14:14:12 -0500</pubDate>
    </item>
  </channel>
</rss>
