<?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 00:08:24 -0500</pubDate>
    <ttl>30</ttl>
    <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[PHPMaster.com: REST - Can You do More than Spell It? Part 1]]></title>
      <guid>http://www.phpdeveloper.org/news/17881</guid>
      <link>http://www.phpdeveloper.org/news/17881</link>
      <description><![CDATA[<p>
On the PHPMaster.com site there's a recent tutorial posted, the first part in a series of posts from <i>David Shirey</i> about <a href="http://phpmaster.com/rest-can-you-do-more-than-spell-it-1/">building REST APIs in PHP</a>. This first part of the series stays pretty high-level and really just introduces some common REST concepts.
</p>
<blockquote>
Thousands of years ago when we first started building web pages, things were very simple. You'd put some text on the page, maybe even an image, and that was pretty much it. But today it's a whole different ball game. Instead of static pages there's the dynamic applications we've come to depend on. And so, how these applications are designed to communicate becomes very important. In this series I'll introduce you to the REST architecture style. In this article I'll help you to understand exactly what it is, and later I'll show you how it can be implemented in a PHP environment.
</blockquote>
<p>
He defines the term "REST" for those not familiar and how a typical RESTful API allows other end users/software to interact directly with its data. He outlines some of the common principles of REST and finishes the post with a comparison of two HTTP verbs - PUT and POST.
</p>]]></description>
      <pubDate>Mon, 30 Apr 2012 09:51:46 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Community News: "Developer Hell" Podcast]]></title>
      <guid>http://www.phpdeveloper.org/news/17252</guid>
      <link>http://www.phpdeveloper.org/news/17252</link>
      <description><![CDATA[<p>
<i>Chris Hartjes</i> and <i>Ed Finkler</i> (two well-known PHP community members) have started up a podcast where they talk about, basically, whatever they want in their "piss-and-moan-driven-development" style. In their first episode, they talk about <a href="http://devhell.info/post/2011-12-10/what-we-hate-about-php/">what they hate about PHP</a>.
</p>
<blockquote>
Listen to a couple old dudes complain that they don't like PHP anymore. Yes, I know, this sounds pretty compelling.
</blockquote>
<p>
They specifically mention the <a href="http://php.net/manual/en/features.file-upload.put-method.php">PUT method support</a> in PHP. You can <a href="http://devhell.s3.amazonaws.com/ep1-64mono.mp3">download the mp3</a> (about an hour and a half long) and check out the two hosts on Twitter: <a href="http://twitter.com/chartjes">Chris</a> and <a href="http://twitter.com/funkatron">Ed</a>.
</p>]]></description>
      <pubDate>Tue, 13 Dec 2011 13:16:19 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPBuilder.com: Building RESTful APIs with the Slim Microframework]]></title>
      <guid>http://www.phpdeveloper.org/news/16958</guid>
      <link>http://www.phpdeveloper.org/news/16958</link>
      <description><![CDATA[<P>
On PHPBuilder.com today there's a new tutorial from <i>Jason Gilmore</i> about building a <a href="http://www.phpbuilder.com/columns/RESTfulAPIs/RESTfulAPIs_10-04-2011.php3">simple RESTful API with Slim</a>, a microframework for PHP.
</p>
<blockquote>
Although a relatively new entrant in the PHP framework sweepstakes, I've been lately quite intrigued by <a href="https://github.com/codeguy/Slim">Slim</a>, a slick RESTful microframework modeled after Ruby's <a href="http://www.sinatrarb.com/">Sinatra</a>, which is coincidentally by far <a href="http://www.developer.com/lang/rubyrails/building-an-ajax-friendly-rest-api-with-sinatra.html">my favorite microframework</a> available for any programming language. In this article I'll show you just how easy it is to get started building a powerful RESTful API using this streamlined framework.
</blockquote>
<p>
Setup of the framework is as simple as downloading the latest copy from <a href="https://github.com/codeguy/Slim">its github repository</a>. It can then be included and used to make the simple routes in his examples. He uses a "games" request type to show how to handle GET, POST and PUT requests through Slim's simple interface.
</p>]]></description>
      <pubDate>Thu, 06 Oct 2011 10:12:07 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Lorna Mitchell's Blog: Adding PUT variables to Request Object in Zend Framework]]></title>
      <guid>http://www.phpdeveloper.org/news/13051</guid>
      <link>http://www.phpdeveloper.org/news/13051</link>
      <description><![CDATA[<p>
<i>Lorna Mitchell</i> has <a href="http://www.lornajane.net/posts/2009/Adding-PUT-variables-to-Request-Object-in-Zend-Framework">added a new post</a> to her blog about adding in PUT variables to your Zend Framework Zend_Request object (useful for web services).
</p>
<blockquote>
Its very simple: I have extended Zend_Controller_Action with my own, and all controllers inherit from here. This has a routeAction() which grabs the incoming variables from a PUT request and sets them as parameters within the usual $this->getRequest() scope, then forwards on the request.
</blockquote>
<p>
Her example adds a call to the isPut method to check for the PUT request type and, if found, takes in the request values and pushes them back into the action's parameter values. Then the controller can make a call back to the request object to pull in the parameters when needed.
</p>]]></description>
      <pubDate>Mon, 17 Aug 2009 09:48:05 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Ian Selby's Blog: Making RESTful Requests in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/12519</guid>
      <link>http://www.phpdeveloper.org/news/12519</link>
      <description><![CDATA[<p>
In <a href="http://www.gen-x-design.com/archives/making-restful-requests-in-php/">a new post</a> to his blog <i>Ian Selby</i> looks at working with REST requests in PHP. He includes some of the basics of REST too, for those not completely familiar with the term.
</p>
<blockquote>
APIs have become a very commonplace part of many popular web sites and services...especially REST APIs. I've already <a href="http://www.gen-x-design.com/archives/create-a-rest-api-with-php/">discussed</a> how you can roll your own REST API for your PHP apps, but I've also received countless requests to go over how to actually make RESTful requests. That's exactly what we'll take a look at in this article
</blockquote>
<p>
His tool of choice is the curl extension, making it simple to create a class wrapper with methods like executePost, executeGet, setAuth and, of course, execute. He outlines the class and gives the code blocks that fit inside each of the major functions. In the end you'll have a class that can make GET, POST, PUT and DELETE requests and be able to correctly parse the response.
</p>]]></description>
      <pubDate>Fri, 15 May 2009 07:57:19 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Kris Jordan's Blog: Towards RESTful PHP - 5 Basic Tips]]></title>
      <guid>http://www.phpdeveloper.org/news/11546</guid>
      <link>http://www.phpdeveloper.org/news/11546</link>
      <description><![CDATA[<p>
<i>Kris Jordan</i> recently posted <a href="http://www.krisjordan.com/2008/12/02/towards-restful-php-5-basic-tips/">five tips</a> to help you get a "more correct" REST interface in your application.
</p>
<blockquote>
As we entered a programmable web of applications with APIs the decision to ignore HTTP gave us problems we're still dealing with today. We have an internet full of applications with different interfaces (GET /user/1/delete vs. POST /user/delete {id=1}). With REST we can say /user/1 is a resource and use the HTTP DELETE verb to delete it. 
</blockquote>
<p>Here's the five (six?) tips:</p>
<ul>
<li>Using PUT and DELETE methods
<li>Send Custom HTTP/1.1 Headers
<li>Send Meaningful HTTP Headers
<li>Don't Use $_SESSION
<li>Test with cURL or rest-client
<li>Use a RESTful PHP Framework
</ul>]]></description>
      <pubDate>Wed, 10 Dec 2008 12:08:27 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Symfony Blog: New in symfony 1.2: Small things matter]]></title>
      <guid>http://www.phpdeveloper.org/news/10952</guid>
      <link>http://www.phpdeveloper.org/news/10952</link>
      <description><![CDATA[<p>
In <a href="http://www.symfony-project.org/blog/2008/09/02/new-in-symfony-1-2-small-things-matter">this new post</a> to the symfony blog today <i>Fabien</i> talks about some of the "small things" that help to make this latest version of the framework (1.2) even better.
</p>
<blockquote>
As for every symfony version, we try to simplify the API and make it more intuitive and powerful. Here are some examples that you will soon enjoy in symfony 1.2.
</blockquote>
<p>
There's four included in the post (and many more in the framework):
</p>
<ul>
<li>Application name in CLI tasks
<li>Native PUT and DELETE support from the browser
<li>Shortcuts in the response
<li>sfValidatorSchemaCompare validator
</ul>]]></description>
      <pubDate>Wed, 03 Sep 2008 09:33:28 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Lorna Mitchell's Blog: Accessing Incoming PUT Data from PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/10728</guid>
      <link>http://www.phpdeveloper.org/news/10728</link>
      <description><![CDATA[<p>
For a recent REST web service project, <i>Lorna Mitchell</i> had to put together a server for the remote clients to use. She started with a GET request then moved to handling a POST request then to a PUT request - that's where <a href="http://www.lornajane.net/posts/2008/Accessing-Incoming-PUT-Data-from-PHP">the difficulty came in</a>:
</p>
<blockquote>
PHP doesn't have a built-in way to do this, and at first I was a little confused as to how I could reach this information. It turns out that this can be read from the incoming stream to PHP, php://input.
</blockquote>
<p>
Pulling from that stream gave her the raw data she needed (nicely urlencoded too) that she could parse out and use. She includes a simple example that has a check for the REQUEST_TYPE in the _SERVER superglobal to see how the request should be handled (PUT versus GET).
</p>]]></description>
      <pubDate>Thu, 31 Jul 2008 12:05:35 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Ben Ramsey's Blog: Supporting PUT & DELETE in the Zend Framework]]></title>
      <guid>http://www.phpdeveloper.org/news/9719</guid>
      <link>http://www.phpdeveloper.org/news/9719</link>
      <description><![CDATA[<p>
<i>Ben Ramsey</i> has <a href="http://benramsey.com/archives/supporting-put-delete-in-the-zend-framework/">recently blogged about</a> some of the research and bit of development that he's done to add "more correct" functionality to the Zend Framework for working with RESTful interfaces - proper PUT and DELETE support.
</p>
<blockquote>
I've recently been wrapped up in an effort to design and implement a RESTful API using the Atom Protocol for a project at work. We are using the Zend Framework as the underlying framework for the project, so, in order to follow the Atom Protocol, I needed to support the HTTP methods PUT and DELETE
</blockquote>
<p>
Since the Zend Framework has been playing such a prominent role in the development, he's been digging into the Zend_Rest_Server component code and isn't too happy about its support for PUT and DELETE. As a result, he's proposed methods that might help resolve things such as isGet, isDelete, isOptions and getEntityBody. He' even created <a href="http://framework.zend.com/issues/browse/ZF-2723">a patch</a> to make the needed changes.
</p>]]></description>
      <pubDate>Thu, 28 Feb 2008 10:27:00 -0600</pubDate>
    </item>
  </channel>
</rss>
