<?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>Thu, 24 May 2012 15:16:35 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Joshua Thijssen's Blog: PHPShout : a shoutcast streamer in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/17734</guid>
      <link>http://www.phpdeveloper.org/news/17734</link>
      <description><![CDATA[<p>
<i>Joshua Thijssen</i> has a new series of posts to his blog about a new extension he's created for PHP that lets you stream music files to an <a href="http://www.icecast.org/">IceCast</a> server with only PHP.
</p>
<blockquote>
To continue our journey in pointless, but nevertheless fun things to create, I've created a simple PHP extension that allows you stream music data to an IceCast server in pure PHP. For this I'm using the libshout3 library which can stream both MP3 or OGG/Vorbis data to multiple stream servers (including IceCast, ShoutCast etc). In this blog-post I will try to explain how I've created this extension, and off course, how you can use it.
</blockquote>
<p>The series is split up into four parts:</p>
<ul>
<li><a href="http://www.adayinthelifeof.nl/2012/03/24/phpshout-a-shoutcast-streamer-in-php-part-1/">Part 1</a> - download and install (and some behind the scenes)
<li><a href="http://www.adayinthelifeof.nl/2012/03/24/phpshout-a-shoutcast-streamer-in-php-part-2/">Part 2</a> - parts of the extension and a first test
<li><a href="http://www.adayinthelifeof.nl/2012/03/24/phpshout-a-shoutcast-streamer-in-php-part-3/">Part 3</a> - populating the store, adding getters
<li><a href="http://www.adayinthelifeof.nl/2012/03/24/phpshout-a-shoutcast-streamer-in-php-part-4/">Part 4</a> - creating setters and some other random functionality
</ul>
<p>
You can find the source for this extension <a href="https://github.com/jaytaph/phpshout">over on his gihub repository</a>.
</p>]]></description>
      <pubDate>Tue, 27 Mar 2012 08:36:55 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[VG Tech Blog: Unit Testing with Streams in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/17229</guid>
      <link>http://www.phpdeveloper.org/news/17229</link>
      <description><![CDATA[<p>
On the VG Tech blog today there's a new post from <i>Andr&eacute; Roaldseth</i> about using <a href="http://phpunit.de">PHPUnit</a> to <a href="http://tech.vg.no/2011/06/27/unit-testing-with-streams-in-php/">test PHP streams</a>, basing the assertions on the data rather than the functionality itself.
</p>
<blockquote>
Using the memory/temporary stream provided by php:// stream wrapper you  can create a stream with read and write access directly to RAM or to a temporary file [using "php://memory"]. This gives you the possibilty to write unit tests that does not rely on a specific file, resource or stream, but rather on data provided by the test itself.
</blockquote>
<p>
There's no specific code examples here, but you can refer to the <a href="http://us3.php.net/manual/en/wrappers.php.php">stream wrappers</a> section of the PHP manual for more details on this and other handy built-in streams. Once created, it can then be used just as <a href="http://no.php.net/manual/en/book.stream.php">any other stream resource</a> can. This could be useful to provide mocks in your testing, replacing any other stream-able resource with a "memory" or "temp" placeholder.
</p>]]></description>
      <pubDate>Thu, 08 Dec 2011 09:13:28 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[DZone.com: Using a stream wrapper to access CouchDb attachments with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/16264</guid>
      <link>http://www.phpdeveloper.org/news/16264</link>
      <description><![CDATA[<p>
On DZone.com today there's a new post from <i>Gonzalo Ayuso</i> about using a stream wrapper to <a href="http://css.dzone.com/news/using-stream-wrapper-access">access CouchDb database</a> directly from PHP (via a call to its local file).
</p>
<blockquote>
Thanks to a <a href="http://gonzalo123.wordpress.com/2010/09/01/using-monkey-patching-to-store-files-into-couchdb-using-the-standard-filesystem-functions-with-php/#comment-377">comment</a> in my last post (many thanks <a href="http://www.whitewashing.de/">Benjamin</a>) I've discovered that it's possible to create a stream wrapper in <a href="http://www.php.net/manual/en/stream.streamwrapper.example-1.php">PHP</a> (I thought it was only available with a C extension). It's pretty straightforward to create the wrapper. Of course it's only an approach. We can create more functionality to our stram wrapper but at least this example meets my needs.
</blockquote>
<p>
His wrapper uses a client from his <a href="http://code.google.com/p/nov-framework/">Nov</a> framework to open the stream to the given path and gives read and write methods to work with the data inside the database. Code for the wrapper class is included as well as a bit of example code showing how it can be used with the custom stream protocol. You can find the complete code <a href="http://code.google.com/p/nov-framework/">here</a>.
</p>]]></description>
      <pubDate>Thu, 28 Apr 2011 10:45:27 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Community News: PHP Community Conference Live Video Stream]]></title>
      <guid>http://www.phpdeveloper.org/news/16233</guid>
      <link>http://www.phpdeveloper.org/news/16233</link>
      <description><![CDATA[<p>
If you weren't able to make it to the <a href="http://phpcon.org">PHP Community Conference</a>, you're in luck! They're providing a <a href="http://openevent.tv/">live video stream</a> from the event on OpenEvent.tv.
</p>
<p>
Check out <a href="http://phpcon.org/schedule">today's schedule</a> for more information what the sessions are and summaries of what they're about. This morning's sessions are tutorials from <i>Lorna Mitchell</i> (web services) and <i>Matthew Weier O'Phinney</i> (Mastering Zend Framework 2 Patterns).
</p>
<p>
You can also follow the official conference twitter account at <a href="http://twitter.com/phpcomcon">@phpcomcon</a> for the latest updates.
</p>
]]></description>
      <pubDate>Thu, 21 Apr 2011 09:56:17 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Gonzalo Ayuso's Blog: Live video streaming with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/15153</guid>
      <link>http://www.phpdeveloper.org/news/15153</link>
      <description><![CDATA[<p>
In a new post to his blog today <i>Gonzalo Ayuso</i> talks about <a href="http://gonzalo123.wordpress.com/2010/09/20/live-video-streaming-with-php/">video streaming and PHP</a>. Well, okay, not so much using PHP for playing the video, more for the security and streaming around the streaming feeds.
</p>
<blockquote>
For example we want to show videos only to registered users based on our authentication system. Imagine we're using sessions for validate users. That's means we cannot put the media in a public folder and point our media player to those files. We can obfuscate the file name but it'll remain public. In this small tutorial We're going to see how to implement it with PHP.
</blockquote>
<p>
Since the video stream he wants to deal with is a live one (and not a single video file that can be read all at once) he shows how to use the <a href="http://php.net/manual/en/book.outcontrol.php">output buffering</a> functions in PHP to output small chunks of the data at a time with the correct <a href="http://php.net/header">headers</a> attached.
</p>]]></description>
      <pubDate>Mon, 20 Sep 2010 08:46:06 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Gonzalo Ayuso's Blog: Using a stream wrapper to access CouchDb attachments with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/15079</guid>
      <link>http://www.phpdeveloper.org/news/15079</link>
      <description><![CDATA[<p>
In his continuing look at using CouchDb as a file system, <i>Gonzalo Ayuso</i> has posted <a href="http://gonzalo123.wordpress.com/2010/09/06/using-a-stream-wrapper-to-access-couchdb-attachments-with-php/">this third part</a> in the group of articles about using streams to connect your scripts to the database instance.
</p>
<blockquote>
I'm still working in my filesystem with CouchDb. After creating a library to enable working with PHP and CouchDB (see the post <a href="http://gonzalo123.wordpress.com/2010/08/30/using-couchdb-as-filesystem-with-php/">here</a>), and after using <a href="http://gonzalo123.wordpress.com/2010/09/01/using-monkey-patching-to-store-files-into-couchdb-using-the-standard-filesystem-functions-with-php/">Monkey Patching</a> to override standard PHP's filesystem functions. I've created another solution now. Thanks to a <a href="http://gonzalo123.wordpress.com/2010/09/01/using-monkey-patching-to-store-files-into-couchdb-using-the-standard-filesystem-functions-with-php/#comment-377">comment</a> in my last post (many thanks Benjamin) I've discovered that it's possible to create a stream wrapper in <a href="http://www.php.net/manual/en/stream.streamwrapper.example-1.php">PHP</a> (I thought it was only available with a C extension).
</blockquote>
<p>
He includes the code for the stream connection wrapper, a pretty simple script that parses the string it's given and opens a read/write stream to the source. There's also a "url_stat" method that will return to you the size of the stream in bytes. Then you just <a href="http://php.net/stream_wrapper_register">register the wrapper</a> and go about your normal file system calls to use the CouchDb directly.
</p>]]></description>
      <pubDate>Mon, 06 Sep 2010 08:15:22 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Andrew Johnstone's Blog: Emailing Attachments: Exim Filters and PHP streams]]></title>
      <guid>http://www.phpdeveloper.org/news/14581</guid>
      <link>http://www.phpdeveloper.org/news/14581</link>
      <description><![CDATA[<p>
New on his blog today <i>Andrew Johnstone</i> has <a href="http://ajohnstone.com/archives/emailing-attachments-exim-filters-and-php-streams/">a post about email attachments</a> how how the combination of Exim filters and PHP streams can make things much easier for you and your application.
</p>
<blockquote>
Using exim filters we could add attachments at the delivery stage, therefore reducing overhead in constructing and injecting data into an email. The delivery of emails varied as to whether it was feasible to send as a BCC or whether there were placeholders intended for each individual recipient. As such the following addresses the worst case scenario of attachments with placeholders intended for each individual recipient.
</blockquote>
<p>
They show how to use a PHP script (that uses streams to pull in the file data and information) hooked into an exim_filter to streamline the attachment process. Configuration file examples are included in the post as well as the PHP source for creating the filter.
</p>]]></description>
      <pubDate>Tue, 01 Jun 2010 08:51:28 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Fabien Potencier's Blog: PHP Iterators and Streams are awesome]]></title>
      <guid>http://www.phpdeveloper.org/news/14560</guid>
      <link>http://www.phpdeveloper.org/news/14560</link>
      <description><![CDATA[<p>
<i>Fabien Potencier</i> has <a href="http://fabien.potencier.org/article/44/php-iterators-and-streams-are-awesome">written up a new post</a> about two features of PHP he thinks are underused and very powerful - iterators and streams.
</p>
<blockquote>
PHP also have a lot of awesome features; at least two of them are in my opinion largely underused: Iterators and Streams. You won't learn how to use them in this post, but with a simple example, I hope you will want to learn more about them.
</blockquote>
<p>
He gives an example of a recent update he made to the sfFinder class for <a href="http://symfony-project.org">Symfony</a> to use iterators instead of the current implementation. With the help of streams, making it translate its searching skills from the local machine out to an Amazon S3 instance was a relatively simple change to the stream's location.
</p>]]></description>
      <pubDate>Wed, 26 May 2010 10:18:55 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Sameer Borate's Blog: Creating custom stream filters]]></title>
      <guid>http://www.phpdeveloper.org/news/12698</guid>
      <link>http://www.phpdeveloper.org/news/12698</link>
      <description><![CDATA[<p>
In <a href="http://www.codediesel.com/php/creating-custom-stream-filters/">a new post to his blog</a> <i>Sameer</i> takes a look at streams and filters in PHP applications, specifically how to set up a custom filter to attach to any stream.
</p>
<blockquote>
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.
</blockquote>
<p>
Streams are the method "behind the scenes" for several of the PHP functions you already use (like <a href="http://php.net/fopen">fsockopen</a> and <a href="http://php.net/file_get_contents">file_get_contents</a>). 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.
</p>]]></description>
      <pubDate>Wed, 17 Jun 2009 07:56:28 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Fabien Potencier's Blog: Tweeting from PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/12686</guid>
      <link>http://www.phpdeveloper.org/news/12686</link>
      <description><![CDATA[<p>
<i>Fabien Potencier</i> has posted a <a href="http://fabien.potencier.org/article/20/tweeting-from-php">quick and dirty</a> method for sending a tweet to <a href="http://www.twitter.com">Twitter</a> directly from a PHP script (provided you have a username and password already).
</p>
<blockquote>
Twitter is everywhere nowadays. Odds are eventually you will want to tweet from PHP. No need to use one of the numerous PHP Twitter libraries, as tweeting is as simple as using the PHP built-in file_get_contents() function.
</blockquote>
<p>
His example creates a stream (<a href="http://php.net/stream_context_create">stream_context_create</a>) and calls <a href="http://php.net/file_get_contents">file_get_contents</a> to send the HTTP request to the twitter API URL.
</p>]]></description>
      <pubDate>Mon, 15 Jun 2009 10:25:15 -0500</pubDate>
    </item>
  </channel>
</rss>

