<?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, 18 May 2013 10:36:13 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[DZone.com: External processes and PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/19182</guid>
      <link>http://www.phpdeveloper.org/news/19182</link>
      <description><![CDATA[<p>
In a new tutorial over on DZone.com <i>Giorgio Sironi</i> talks about <a href="http://css.dzone.com/articles/external-processes-and-php">handling external processes</a> in PHP and how to work with <a href="http://php.net/streams">streams</a>.
</p>
<blockquote>
I've come to known a bit about spawning and monitoring new processes from PHP code, while working at Onebip and trying to contribute to Paratest. Here's what you need to know if you think exec() or executing everything in a single .php script is always enough.
</blockquote>
<p>
He starts with a look at the differences between using things like <a href="http://php.net/exec">exec</a> and streams for handling the spawning of other processes. He shows how you have more control when you go with the streams option and process handling with the "proc_*" methods. He also touches on some other things to think about like stream blocking, sleeping and dealing with multiple execution streams (and switching between them).
</p>]]></description>
      <pubDate>Thu, 14 Feb 2013 11:29:04 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Community News: ZendCon Keynotes Live Stream]]></title>
      <guid>http://www.phpdeveloper.org/news/18646</guid>
      <link>http://www.phpdeveloper.org/news/18646</link>
      <description><![CDATA[<p>
If you weren't able to make it to this year's <a href="http://zendcon.com">ZendCon conference</a> (happening right now in Santa Clara, CA) you can at least get a little taste of it though their <a href="http://www.zend.com/en/company/zendcon-live?src=hpb">live video stream</a> of the keynotes.
</p>
<p>There's five sessions they'll be sharing via the stream starting today and running through the 25th:</p>
<ul>
<li>Opening Keynote - <i>Andi Gutmans</i> (Zend)
<li>Open Source Cloud Technologies -<i> Jimmy Guerrero</i> (Red Hat, Inc.), <i>Adrian Otto</i> (Rackspace) and <i>Peder Ulander</i> (Citrix Systems)
<li>The Media Industry and Moving to PHP - <i>Raghu Bala</i> (Source Interlink), <i>Brent Pearson</i> (UBM Technology)
<li>PHP in the Cloud: Choice, Scale, Code, Simplify - <i>Simone Brunozz</i> (Amazon Web Services)
<li>Zend Framework 2 - Practical Experience from the Trenches - <i>Matthew Weier O`Phinney</i> (Zend Technologies), <i>Shawn Stratton</i> (Discovery Communications, Inc.), <i>Evan Coury</i> (SouthwestMedical.com) and <i>Mike Willbanks</i> (CaringBridge)
</ul>
<p>
The Opening Keynote starts at 8:30am PDT, so keep your eyes <a href="http://www.zend.com/en/company/zendcon-live?src=hpb">here</a> for that broadcast.
</p>]]></description>
      <pubDate>Tue, 23 Oct 2012 08:27:35 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Paul Jones' Blog: When Possible, Use File *Resources* Instead Of File *Names*]]></title>
      <guid>http://www.phpdeveloper.org/news/18173</guid>
      <link>http://www.phpdeveloper.org/news/18173</link>
      <description><![CDATA[<p>
In <a href="http://paul-m-jones.com/archives/2487">this new post</a> to his blog <i>Paul Jones</i> makes a suggestion when you're working with files or external connections in your PHP applications - pass the resource, not the file/path name for more flexibility.
</p>
<blockquote>
In testing the <a href="https://github.com/auraphp/Aura.Http">Aura.Http</a> package, I have realized that it's much more flexible, testing wise, to pass around file resources (a.k.a. handles, pointers, or streams) than it is to pass around file names. When you do that, you can use a php://memory stream instead of attempting to touch the file system.
</blockquote>
<p>
He shows how using this method can make it easier to test with a simple bit of refactoring by passing in the "php://memory" stream rather than the actual file reference. The comment (from <i>Chris Hartjes</i>) also suggests an alternative tool for working with tests that need the file system, <a href="https://github.com/mikey179/vfsStream">vfsStream</a>.
</p>]]></description>
      <pubDate>Wed, 04 Jul 2012 14:10:49 -0500</pubDate>
    </item>
    <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>
  </channel>
</rss>
