<?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 18:14:02 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Gonzalo Ayuso: Enqueue Symfony's process components with PHP and ZeroMQ]]></title>
      <guid>http://www.phpdeveloper.org/news/19434</guid>
      <link>http://www.phpdeveloper.org/news/19434</link>
      <description><![CDATA[<p>
<i>Gonzalo Ayuso</i> has a new post today showing how he set up <a href="http://gonzalo123.com/2013/04/08/building-a-zeromq-enqueue-with-php/">queuing with ZeroMQ and Symfony components</a> and <a href="http://reactphp.org/">React</a>.
</p>
<blockquote>
Today I'd like to play with <a href="http://www.zeromq.org/">ZeroMQ</a>. ZeroMQ is a great tool to work with sockets. I will show you the problem that I want to solve: One web application needs to execute background processes but I need to execute those processes in order. Two users cannot execute one process at the same time. OK, if we face to this problem we can use Gearman. I've written various posts about Gearman (<a href="http://gonzalo123.com/2011/03/07/watermarks-in-our-images-with-php-and-gearman/">here</a> and <a href="http://gonzalo123.com/2010/11/01/database-connection-pooling-with-php-and-gearman/">here</a> for example). But today I want to play with ZeroMQ.
</blockquote>
<p>
He uses React and some ZeroMQ bindings and Symfony's <a href="https://github.com/symfony/Process">Process</a> component to make a simple client and server for working with the queue and processes. A screencast is included in the post showing them making the connection and adding the new process. The full code can be found <a href="https://github.com/gonzalo123/zmqlifo">on github</a> (or installable <a href="https://packagist.org/packages/gonzalo123/zmqlifo">via Composer</a>)
</p>
Link: http://gonzalo123.com/2013/04/08/building-a-zeromq-enqueue-with-php]]></description>
      <pubDate>Tue, 09 Apr 2013 11:11:59 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Amazon Web Services Blog: Version 2 of the AWS SDK for PHP (now with Guzzle)]]></title>
      <guid>http://www.phpdeveloper.org/news/18756</guid>
      <link>http://www.phpdeveloper.org/news/18756</link>
      <description><![CDATA[<p>
The Amazon Web Services group has recently released an <a href="http://aws.typepad.com/aws/2012/11/version-2-of-the-aws-sdk-for-php.html">updated version of their SDK for PHP</a> and at it's heart is the open source project <a href="http://guzzlephp.org/">Guzzle</a> (a HTTP client framework).
</p>
<blockquote>
The new SDK is built on top of the <a href="http://guzzlephp.org/">Guzzle HTTP client framework</a>, which provides increased performance and enables event-driven customization. Each AWS service client extends the Guzzle client and describes operations on the service using a service description file. The SDK now manages persistent connections for both serial and parallel requests. It detects transient network failures, with automatic retries using truncated exponential backoff. Support for event hooks (via the <a href="http://symfony.com/doc/2.0/components/event_dispatcher/introduction.html">Symfony2 EventDispatcher</a>) allows you to implement custom, event-driven behavior.
</blockquote>
<p>
In <a href="http://aws.typepad.com/aws/2012/11/version-2-of-the-aws-sdk-for-php.html">the AWS post</a> about the update, they give you a few code snippets showing this updated version in use. This completely reworked version of the SDK is not compatible with the previous version, so you'll need to consult their <a href="http://docs.amazonwebservices.com/awssdkdocsphp2/latest/migrationguide/sdk-php2-migration-guide-welcome.html">migration guide</a> to bring things up to date.
</p>]]></description>
      <pubDate>Thu, 15 Nov 2012 14:57:49 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Debugging PHP Code with FirePHP]]></title>
      <guid>http://www.phpdeveloper.org/news/18673</guid>
      <link>http://www.phpdeveloper.org/news/18673</link>
      <description><![CDATA[<p>
On PHPMaster.com today there's a new tutorial showing you a different method for debugging your code than the usual <a href="http://php.net/print_r">print_r</a> or <a href="http://php.net/var_dump">var_dump</a> - <a href="http://phpmaster.com/debugging-php-code-with-firephp/">using FirePHP</a>, a tool that uses messaging to relay information back to your browser.
</p>
<blockquote>
As the technical manager of a suite of software projects, one of my duties is doing code reviews. One of the things I see far more often than I'd like when doing reviews is debugging PHP code committed and pushed up the chain. [...] The safest method of debugging requires configuring your IDE to use a tool like Xdebug or Zend Debugger to trace currently executing code. This isn't always practical. In the absence of using a fully configured debug environment, I turn to FirePHP.
</blockquote>
<p>
He shows how to set up and configure <a href="http://www.firephp.org">FirePHP</a> to work with your debugging and some suggestions on browser extensions you can install to view the messages. Sample code is included showing you how to use the tool to send messages back to the browser including grouping messages, building tables and something that shows a conditional caching report message.
</p>]]></description>
      <pubDate>Tue, 30 Oct 2012 08:36:21 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Lorenzo Alberton: Updated Kafka PHP client library]]></title>
      <guid>http://www.phpdeveloper.org/news/18489</guid>
      <link>http://www.phpdeveloper.org/news/18489</link>
      <description><![CDATA[<p>
<i>Lorenzo Alberton</i> has a new post with an update about a library he's been working on to <a href="http://www.alberton.info/kafka_07_php_client_library.html">interface with Apache's Kafka system</a>, "a persistent, distributed, high-throughput publish-subscribe messaging system".
</p>
<blockquote>
Over a year ago I sort of reverse-engineered the protocol, and published a first rudimental library to produce and consume messages with version 0.05. Since then, the Kafka project has evolved a lot, moving from the LinkedIN repositories to the <a href="http://www.alberton.info/kafka_apache_incubator.html">Apache Incubator</a>, gaining traction, committers, features. The protocol has changed slightly too, so the old library doesn't work anymore with the new version (0.6+).
</blockquote>
<p>
<a href="https://github.com/quipo/kafka/tree/master/clients/php">The library</a> has gotten lots of new features in this update including gzip compression support, custom exception handling and better connection handling. He includes some sample code in the post showing how to create both the Producer and Consumer for the messages (and one for working with <a href="http://zookeeper.apache.org/">Zookeeper</a>).
</p>]]></description>
      <pubDate>Tue, 18 Sep 2012 11:58:50 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Message Brokering with RabbitMQ]]></title>
      <guid>http://www.phpdeveloper.org/news/18385</guid>
      <link>http://www.phpdeveloper.org/news/18385</link>
      <description><![CDATA[<p>
On PHPMaster.com today they've posted a new tutorial that helps you get started adding queuing to your application <a href="http://phpmaster.com/message-brokering-with-rabbitmq/">with PHP and RabbitMQ</a>.
</p>
<blockquote>
RabbitMQ is open-source message brokering software written in Erlang. The MQ in its name refers to a standard known as Advanced Message Queuing Protocol.  For our purposes, and most others, it acts as a middleman between producer (sending) and consumer (receiving) programs - it simply accepts and forwards messages. [...] Both producers and consumers can be written in any language that has an available RabbitMQ or AMQP client library. In this article, I'll demo a producer program written in PHP and a consuming program in Python.
</blockquote>
<p>
He walks you through the installation for both <a href="http://www.rabbitmq.com/download.html">RabbitMQ</a> itself and the PHP (<a href="https://github.com/videlalvaro/php-amqplib">php-amqlib</a>) and Python (pika) tools to use for the interfaces. There's some details on how the queuing system works and the code for the sample clients is included as well as commands to use the two clients to send/receive messages.
</p>]]></description>
      <pubDate>Tue, 21 Aug 2012 11:04:07 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Access Dropbox Using PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/18318</guid>
      <link>http://www.phpdeveloper.org/news/18318</link>
      <description><![CDATA[<p>
PHPMaster.com has a new tutorial that wants to help you access one of the most popular file sharing sites out there, Dropbox, <a href="http://phpmaster.com/access-dropbox-using-php/">through your code</a> (via the DropBox API).
</p>
<blockquote>
In this article we'll explore the Dropbox API by building a simple client for accessing files in a Dropbox account. The client will perform some basic operations, such as authentication, listing files, and uploading and downloading files.
</blockquote>
<p>
You can grab the <a href="https://github.com/phpmasterdotcom/AccessDropboxUsingPHP">full code on github</a> that provides you with some of the base you'll need to access the service (and help to make the tutorial a little shorter). They walk you through the process to create a new application on the DropBox Developer site and how to use the keys they give you to connect your app. The client included with the github download then lets you call things like "getFile", "putFile" and "accountInfo" to push/pull information from their RESTful API.
</p>]]></description>
      <pubDate>Fri, 03 Aug 2012 14:58:13 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Christoph Hochstrasser: PHP Socket Programming, done the Right Way (tm)]]></title>
      <guid>http://www.phpdeveloper.org/news/18302</guid>
      <link>http://www.phpdeveloper.org/news/18302</link>
      <description><![CDATA[<p>
In one of his recent posts <i>Christoph Hochstrasser</i> looks at <a href="http://christophh.net/2012/07/24/php-socket-programming/">socket programming</a> done the right way, complete with code examples showing both client and server setups.
</p>
<blockquote>
When writing about socket programming with PHP, nearly all articles are about the Socket Extension, despite it's the unfriendliest and most cumbersome way to work with Sockets in modern PHP. Let me introduce you to something, which apparently is pretty unknown among PHP programmers.
</blockquote>
<p>
He starts off by introducing the concept of a socket (for those that are beginners on the topic) and talks about two of the major ways to work with them - the Socket extension and Streams. He shows how to use the stream_socket_client_* functions to connect to a remote server and make a HTTP request for the base page. He also shows the other side of things, making a simple "echo" server that binds to port 1337.
</p>]]></description>
      <pubDate>Wed, 01 Aug 2012 10:16:15 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Marcelo Gornstein's Blog: Unit test your PHP IVR applications with PAGI]]></title>
      <guid>http://www.phpdeveloper.org/news/17613</guid>
      <link>http://www.phpdeveloper.org/news/17613</link>
      <description><![CDATA[<p>
<i>Marcelo Gornstein</i> has a recent post to his blog about a method he's come up with to test your PHP-based IVR ("interactive voice response" systems for telephony) applications <a href="http://marcelog.github.com/articles/pagi_mock_client_unit_test_ivr_application_telephony_asterisk_agi.html">with the help of PAGI</a>.
</p>
<blockquote>
Since version 1.9.2, <A href="http://marcelog.github.com/PAGI/">PAGI</a> comes with a mock of a pagi client, suitable to be used in your own unit tests, so you can test your telephony applications, like IVRs. The idea behind the mocked client is to let you test the callflow side of your application, the user interaction and the exact sequence an ivr application should obey. Let's see how to use it.
</blockquote>
<p>
He shows how to test a <a href="http://marcelog.github.com/articles/pagi_tutorial_create_voip_telephony_application_for_asterisk_with_agi_and_php.html">basic PAGI application</a> by hooking in the PAGI client into his <a href="https://github.com/marcelog/Pagi-App-And-Test-Example/blob/master/test/php/App/AppTest.php">PHPUnit test</a> for the app and the <a href="http://marcelog.github.com/articles/pagiexamplecoverage.png">code coverage</a> of the result. The <a href="http://ci.marcelog.name:8080/job/PAGI/javadoc/db_Client_Impl_MockedClientImpl.html#%5CPAGI%5CClient%5CImpl%5CMockedClientImpl">MockedClientImpl</a> client lets you test the application without having the external dependency of actually running it. He includes some examples of commands and how they'd be mocked out with this client as well as a handy list of the "on*" methods available (like "onDial" or "onSayAlpha").
</p>
<p>
You can find the complete source for everything in the article <a href="https://github.com/marcelog/Pagi-App-And-Test-Example">on his github account</a>.
</p>]]></description>
      <pubDate>Thu, 01 Mar 2012 13:25:49 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[php|architect: What Will Power the Future of the Internet: REST or SOAP? ]]></title>
      <guid>http://www.phpdeveloper.org/news/17599</guid>
      <link>http://www.phpdeveloper.org/news/17599</link>
      <description><![CDATA[<p>
On the php|architect site today there's <a href="http://www.phparch.com/2012/02/what-will-power-the-future-of-the-internet-rest-or-soap/">a new article</a> from <i>Luke Stokes</i> asking a question about the future of the web (and web serivces) - is the future in REST or SOAP?
</p>
<blockquote>
I was recently asked why we chose REST over SOAP for our re-write of the <a href="http://www.foxycart.com/">FoxyCart.com</a> API, and the short answer that immediately came to mind was, "Because I don't hate myself". To expand on that answer, let me give you a little bit of the back story.
</blockquote>
<p>
He talks about their goals for the product and its API, how they wanted to create something useful, built by developers for developers. They leaned towards REST mostly because of the problems and overhead introduced with SOAP (and the complex nature of its requests). He also gives a few reasons why he's "excited about REST": working with known data types, standard interface methods and the fact that it's still such a hot topic of discussion.
</p>
<blockquote>
These questions [about HATEOS, hypermedia, vendor-specific content types] might seem overwhelming, but for us they are exciting! We believe the future of consistent, powerful API development is being defined right now, and we get to be a part of it.
</blockquote>]]></description>
      <pubDate>Tue, 28 Feb 2012 12:16:17 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[IBM developerWorks: Hook into Wikipedia information using PHP and the MediaWiki API]]></title>
      <guid>http://www.phpdeveloper.org/news/16732</guid>
      <link>http://www.phpdeveloper.org/news/16732</link>
      <description><![CDATA[<p>
On the IBM developerWorks site, there's a tutorial from <i>Vikram Vaswani</i> showing you how to <a href="http://www.ibm.com/developerworks/web/library/x-phpwikipedia/index.html?ca=drs-">connect to Wikipedia's API</a> in your PHP application. It shows how to fetch, search and update entries through their backend. The tutorial's a little bit older (from May 2011) but the content is still relevant.
</p>
<blockquote>
Wikipedia is the ultimate online encyclopedia, containing millions of entries on different aspects of human knowledge. Web application developers are able to access and search these entries through the Wikipedia API. This article introduces the Wikipedia API and demonstrates it in the context of a PHP application, explaining how to search and retrieve different elements of Wikipedia content with PHP.
</blockquote>
<p>
He starts with a general introduction to the API including example feed results and URL request formats. From there he moves into the code - a mostly Zend Framework-driven example that uses the REST client. He shows how to make requests for categories, full-text search, grabbing raw page content and adding/editing the content of pages.
</p>]]></description>
      <pubDate>Wed, 17 Aug 2011 12:16:25 -0500</pubDate>
    </item>
  </channel>
</rss>
