<?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>Sun, 19 May 2013 22:52:45 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[MaltBlue.com: Use RouteMatch in Zend Framework 2 For Easy Routing]]></title>
      <guid>http://www.phpdeveloper.org/news/19536</guid>
      <link>http://www.phpdeveloper.org/news/19536</link>
      <description><![CDATA[<p>
In the latest to his site <i>Matthew Setter</i> takes a look at <a href="http://www.maltblue.com/tutorial/use-zend-framework-2-routematch-for-dynamic-routing">easy routing with RouteMatch</a> in Zend Framework 2 applications. The <a href="http://framework.zend.com/apidoc/2.0/classes/Zend.Mvc.Router.Http.RouteMatch.html">RouteMatch</a> component gives you better control over your routing and lets you define "match paths" for URL to Controller mappings.
</p>
<blockquote>
Today using Zend Framework 2 RouteMatch, Router and Request objects, I show you an easy way to dynamically update the current route. It's almost painlessly simple. [...] Well, like most things in web application development, what starts out simply in the beginner often grows more complex over time. So too is my once simple route.
</blockquote>
<p>
His "simple" route started getting a bit out of control when he added in some pagination to the page (and query for the path match). He wanted to figure out how to re-render data with the same filters but show the next page of data. He shows how to use the RouteMatch component to achieve just this. He creates a custom module with a "listViewToolbar" helper that lets you read the router, request and handle the parameters sent via the URL. The "invoke" method is called to render the toolbar in the page, complete with the new settings.
</p>
Link: http://www.maltblue.com/tutorial/use-zend-framework-2-routematch-for-dynamic-routing]]></description>
      <pubDate>Thu, 02 May 2013 11:14:22 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[NetTuts.com: HTTP: The Protocol Every Web Developer Must Know - Part 2]]></title>
      <guid>http://www.phpdeveloper.org/news/19521</guid>
      <link>http://www.phpdeveloper.org/news/19521</link>
      <description><![CDATA[<p>
NetTus.com has followed up their <a href="http://phpdeveloper.org/news/19433">previous article</a> covering some of the basics of the HTTP protocol with <a href="http://net.tutsplus.com/tutorials/tools-and-tips/http-the-protocol-every-web-developer-must-know-part-2">this new post</a>, part 2 of the series. They suggest that HTTP, the messaging format of the web, is the one protocol that every web developer should know.
</p>
<blockquote>
In my <a href="http://net.tutsplus.com/tutorials/tools-and-tips/http-the-protocol-every-web-developer-must-know-part-1/">previous article</a>, we covered some of HTTP's basics, such as the URL scheme, status codes and request/response headers. With that as our foundation, we will look at the finer aspects of HTTP, like connection handling, authentication and HTTP caching. These topics are fairly extensive, but we'll cover the most important bits.
</blockquote>
<p>
In this article, they talk about things like the HTTPS secure version of HTTP, server-side connection handling, identification/authorization and working with caching and cache control headers.
</p>
Link: http://net.tutsplus.com/tutorials/tools-and-tips/http-the-protocol-every-web-developer-must-know-part-2]]></description>
      <pubDate>Mon, 29 Apr 2013 15:07:21 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[NetTuts.com: HTTP: The Protocol Every Web Developer Must Know - Part 1]]></title>
      <guid>http://www.phpdeveloper.org/news/19433</guid>
      <link>http://www.phpdeveloper.org/news/19433</link>
      <description><![CDATA[<p>
On NetTuts.com there's a new tutorial about what they think is the one thing every web developer should understand - <a href="http://net.tutsplus.com/tutorials/tools-and-tips/http-the-protocol-every-web-developer-must-know-part-1/">the HTTP protocol</a> and how its used in web-based communications.
</p>
<blockquote>
HTTP stands for Hypertext Transfer Protocol. It's a stateless, application-layer protocol for communicating between distributed systems, and is the foundation of the modern web. As a web developer, we all must have a strong understanding of this protocol. Let's review this powerful protocol through the lens of a web developer. We'll tackle the topic in two parts. In this first entry, we'll cover the basics and outline the various request and response headers. 
</blockquote>
<p>
They cover some of the basics of the protocol first including its statelessness, the concept of URLs and the HTTP "verbs" (like GET, POST and DELETE). They also briefly cover the HTTP response codes (ex. 200, 304) and the flow of the request and response to and from the web server. They also look at some of the basic HTTP headers and the actual low-level text formats of the requests/responses.
</p>
<p>
There's a section at the end of the post that links you to a few tools that you can use to view the HTTP messaging happening in your requests, some of which you might already have. They also briefly cover the use of HTTP in a few libraries - ExpressJS, Ruby on Rails and jQuery's Ajax handling.
</p>
Link: http://net.tutsplus.com/tutorials/tools-and-tips/http-the-protocol-every-web-developer-must-know-part-1/]]></description>
      <pubDate>Tue, 09 Apr 2013 10:56:28 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Jason Fox: Use the Accept Header to Set Your Return Data With Zend Framework 2]]></title>
      <guid>http://www.phpdeveloper.org/news/19222</guid>
      <link>http://www.phpdeveloper.org/news/19222</link>
      <description><![CDATA[<p>
<i>Jason Fox</i> has a recent post to his site about using <a href="http://neverstopbuilding.net/use-the-accept-header-to-set-your-return-data-with-zend-framework-2/?utm_source=reddit">"Accept" headers in Zend Framework 2 apps</a> to set the format of the return data from a request.
</p>
<blockquote>
In this article I detail the process by which you can set up your controller actions in Zend Framework 2 to return either the default HTML, or JSON data depending on the "Accept Header" in the request. It incorporates changes related to a security update added since this <a href="http://akrabat.com/zend-framework-2/returning-json-using-the-accept-header-in-zf2/">very helpful article</a> was written, and expands on some of the intricacies of making your web layer objects better "json providers."
</blockquote>
<p>
His example uses a "ViewJsonStrategy" and the criteria to look for to determine which version to respond with (HTML or JSON) - the Accept header. It uses the JSON encoder/decoder instead of the built-in PHP one to he could use the included "toJson" method to customize the output of the JSON instead of just returning everything.
</p>]]></description>
      <pubDate>Fri, 22 Feb 2013 11:42:35 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Hari KT: Aura.Http : Request and Response]]></title>
      <guid>http://www.phpdeveloper.org/news/19194</guid>
      <link>http://www.phpdeveloper.org/news/19194</link>
      <description><![CDATA[<p>
On his blog today <i>Hari KT</i> has an <a href="http://auraphp.github.com/">Aura Framework</a>-related post about one of its components, <a href="http://harikt.com/blog/2013/02/16/aura-dot-http-request-and-response/">the Aura.Http component</a>, and its handling of HTTP requests and responses.
</p>
<blockquote>
The Aura.Http package provide you the tool to build and send request and response. [...] Probably you may not have bothered too much on building the http response either the framework does it for you, or until you need to send the correct response.
</blockquote>
<p>
The post shows you how to use the component to send and receive HTTP requests. Code is included showing how to make Response objects and set headers, content, cookies and HTTP response code. He also shows how to output the response and a more complete example of the entire flow. The post finishes up with an example of using Aura.Http to make a request to another site - in this case back to GitHub to get the users on a repository.
</p>]]></description>
      <pubDate>Mon, 18 Feb 2013 11:49:58 -0600</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[Reddit.com: Year Old Bug Request for $_PUT Interested in /r/php's Opinion]]></title>
      <guid>http://www.phpdeveloper.org/news/18645</guid>
      <link>http://www.phpdeveloper.org/news/18645</link>
      <description><![CDATA[<p>
A discussion has started up on Reddit.com about the <a href="http://www.reddit.com/r/PHP/comments/11uczq/year_old_bug_request_for_put_interested_in_rphps/">request for a "$_PUT" superglobal</a> to match the already existing "$_POST" and "$_GET" (as is mentioned in <a href="https://bugs.php.net/bug.php?id=55815">this bug</a>).
</p>
<blockquote>
Data that is posted to PHP via the PUT method is not parsed at all and is not 
available to PHP. This is particularly problematic for data sent encoded as 'multipart/form-data'. [...] This is something that would help every RESTful interface that people are trying to do with PHP. There are many people who have these problems and have to implement (usually incomplete and/or buggy) PHP solutions.
</blockquote>
<p>
In the <a href="http://www.reddit.com/r/PHP/comments/11uczq/year_old_bug_request_for_put_interested_in_rphps/">Reddit post</a> there's a mixed set of opinions - some say that things work well enough as is (content pulled from the raw stream) and others say that adding something like this makes the HTTP support more complete and functional.
</p>]]></description>
      <pubDate>Tue, 23 Oct 2012 09:48:12 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Sebastian G&ouml;ttschkes: symfony2: Testing secure pages]]></title>
      <guid>http://www.phpdeveloper.org/news/18571</guid>
      <link>http://www.phpdeveloper.org/news/18571</link>
      <description><![CDATA[<p>
<i>Sebastian G&ouml;ttschkes</i> has a new post to his site showing you how to <a href="http://sgoettschkes.blogspot.com/2012/10/symfony2-testing-secure-pages.html">test secure pages</a> within your Symfony2 applications using a simple "requestWithAuth" method.
</p>
<blockquote>
If you develop a web application, more often than not you have some kind of user section or admin panel where some kind of login identifies the user and protects your actions against usage from unauthorized people. It can be difficult to do functional tests with this kind of pages as you need to simulate some session or cookie context. In this tutorial, I want to show you how to test your functional pages with symfony2 and phpunit.
</blockquote>
<p>
He includes a "bad way" to do it, cheating by making a client and feeding it the HTTP auth credentials, and a more correct way involving the "requestWithAuth" method that's called whenever the "request" is called to push those credentials along with every request. Code for this basic function is included.
</p>]]></description>
      <pubDate>Mon, 08 Oct 2012 13:13:19 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DZone.com: All the ways to perform HTTP requests in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/18167</guid>
      <link>http://www.phpdeveloper.org/news/18167</link>
      <description><![CDATA[<p>
On DZone.com there's a recent post from <i>Giorgio Sironi</i> listing out some of the <a href="http://css.dzone.com/articles/all-ways-perform-http-requests">HTTP client utilities</a> that can be used in your PHP applications.
</p>
<blockquote>
In the PHP world, HTTP is very important: not only for receiving requests, which is the job of PHP application, but also for performing them. ROT web services are probably the most popular way to interface with external systems nowadays. We'll make no assumptions on the payload of HTTP requests (which may be binary, text, JSON, XML), so you'll have to deal with that yourself. In some cases, you may choose a more specific solution such as the SoapClient class in the SOAP extension, or the XML-RPC extension.
</blockquote>
<p>
Among the methods he mentions are things like <a href="http://php.net/curl">the cURL extension</a>, <a href="http://it.php.net/fsockopen>fsockopen</a> and <a href="http://it.php.net/manual/en/book.http.php">the PECL HTTP extension</a>. He also talks about some of the libraries out there that are popular among developers (<a href="https://github.com/kriswallsmith/Buzz">Buzz</a> and <a href="https://github.com/guzzle/guzzle">Guzzle</a>) as well as the modules included in the Zend Framework (v1 and v2) to make the requests.
</p>]]></description>
      <pubDate>Tue, 03 Jul 2012 10:18:21 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: REST - Can You do More than Spell It? Part 4]]></title>
      <guid>http://www.phpdeveloper.org/news/17981</guid>
      <link>http://www.phpdeveloper.org/news/17981</link>
      <description><![CDATA[<p>
PHPMaster.com has posted the latest tutorial in their series covering RESTful APIS - <a href="http://phpmaster.com/rest-can-you-do-more-than-spell-it-4/">part four</a> of "REST - Can you do More than Spell it?" In this latest part of the series, they focus on something very key to RESTful services, the HTTP spec (and headers).
</p>
<blockquote>
We're getting close to the end now, and the only thing remaining is to discuss a little more about the protocol you'll most likely use in any RESTful application that you write. Because HTTP is so often used with REST, that's the protocol I'd like to focus on.
</blockquote>
<p>
He goes through the structure of a typical (raw) HTTP header and talks about some of the more common headers and what actions/settings they represent. He includes examples of setting headers (with <a href="http://php.net/header">header</a>, naturally) and a <a href="http://php.net/curl">curl</a> example showing how to set the request headers. The tutorial is finished off with a brief mention of custom HTTP headers and the the good and bad that comes with them.
</p>]]></description>
      <pubDate>Mon, 21 May 2012 08:44:26 -0500</pubDate>
    </item>
  </channel>
</rss>
