<?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, 12 Feb 2012 20:16:50 -0600</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[PHPMaster.com: Where on Earth are You?]]></title>
      <guid>http://www.phpdeveloper.org/news/17485</guid>
      <link>http://www.phpdeveloper.org/news/17485</link>
      <description><![CDATA[<p>
In PHPMaster.com's latest tutorial <i>Lukas White</i> introduces you to using the Yahoo "Placemaker" web service to <a href="http://phpmaster.com/where-on-earth-are-you/">geographically locate a place from a free-form text string</a>. The results include "place details" like the type of the location, latitude, longitude and how confident they are in their match.
</p>
<blockquote>
The challenge then is to do two things: work out what place you could be talking about, disambiguate if necessary, and then identify exactly where on Earth that is. That's what I'll show you how to do in this article; by using a freely available web service, we'll write a simple program to ask users where they are (and ask them to clarify if necessary) before identifying their responses in concrete terms.
</blockquote>
<p>
He shows how to make a request to the <a href="http://developer.yahoo.com/geo/placemaker/">Placemaker</a> web service, passing it a string coming from the user, to be located. The POST request contains a few pieces of data including an application ID 
, your desired output type and the language you're using for the input. His example code uses <a href="http://php.net/curl">curl</a> to make the request and handles it (the XML response at least) with a call to <a href="http://php.net/simplexml_load_string">simplexml_load_string</a>.
</p>]]></description>
      <pubDate>Thu, 02 Feb 2012 08:52:54 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Lorna Mitchell's Blog: Building A RESTful PHP Server: Understanding the Request]]></title>
      <guid>http://www.phpdeveloper.org/news/17418</guid>
      <link>http://www.phpdeveloper.org/news/17418</link>
      <description><![CDATA[<p>
In <a href="http://www.lornajane.net/posts/2012/building-a-restful-php-server-understanding-the-request">this new post</a> to her blog <i>Lorna Mitchell</i> starts off a new series (based on popular demand) looking at building an RESTful server in PHP. Back to basics - no framework, just PHP.
</p>
<blockquote>
In the first part of this (probably) 3-part series, we'll begin with the basics. It might seem boring, but the most important thing to get right with REST is parsing all the various elements of the HTTP request and responding accordingly. I've put in code samples from from a small-scale toy project I created to make me think about the steps involved.
</blockquote>
<p>Her "basics" include:</p>
<ul>
<li>the routing to send everything to the main index file (a "front controller" of sorts) with the .htaccess settings included
<li>Handling the incoming request with a "Request" class
<li>Parsing the incoming parameters from the "php://input" stream
</p>]]></description>
      <pubDate>Thu, 19 Jan 2012 10:02:18 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Targeted Geolocation with Geonames]]></title>
      <guid>http://www.phpdeveloper.org/news/17251</guid>
      <link>http://www.phpdeveloper.org/news/17251</link>
      <description><![CDATA[<p>
New on PHPMaster.com there's a tutorial from <i>Lukas White</i> about <a href="http://phpmaster.com/targeted-geolocation-with-geonames/">targeting users using geolocation</a> based on the <a href="http://www.geonames.org/">Geonames</a> web service and a latitude/longitude. His example makes a call to find the closest "place" to the given coordinates.
</p>
<blockquote>
Location-aware applications rely on being able to locate where you are, and this is what geolocation is all about. After all, once the application knows your location, it can go on to find the nearest store, guide you through the appropriate route to a destination, or target relevant advertisements to you. Geolocation, then, is simply the mechanism for identifying your geographical location.
</blockquote>
<p>
He mentions two challenges associated with geolocation - finding where someone is and describing the location. With Geonames, he shows how to call the service's "findNearbyPlaceName" method to find the closest "place" to a given latitude/longitude combination. Included is a bit of sample PHP to connect to the service and Javascript to request the user's current location.
</p>]]></description>
      <pubDate>Tue, 13 Dec 2011 12:10:02 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[ZendCasts.com: RESTful Delete with SLIM, jQuery and JSON]]></title>
      <guid>http://www.phpdeveloper.org/news/17248</guid>
      <link>http://www.phpdeveloper.org/news/17248</link>
      <description><![CDATA[<p>
Continuing on with his webcast series looking at using the Slim microframework to create a RESTful web service with JSON Output, <i>John Lebensold</i> takes the code from the previous tutorials (<a href="http://phpdeveloper.org/news/16958">part one</a>, <a href="http://phpdeveloper.org/news/17044">two</a>, <a href="http://phpdeveloper.org/news/17106">three</a>) and <a href="http://www.zendcasts.com/restful-delete-with-slim-jquery-and-json/2011/12/">adds handling for DELETE</a> to remove values from the data.
</p>
<blockquote>
This tutorial will show you how to add jQuery RESTful calls for using the DELETE verb when deleting items via a JSON REST interface.
</blockquote>
<p>
You'll definitely need to check out either the previous tutorials in the series to follow along with the code or <a href="https://gist.github.com/1469109">grab the current source</a> to see how everything's structured.
</p>]]></description>
      <pubDate>Tue, 13 Dec 2011 09:56:34 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Reddit.com: Should I be doing just about everything using REST?]]></title>
      <guid>http://www.phpdeveloper.org/news/17225</guid>
      <link>http://www.phpdeveloper.org/news/17225</link>
      <description><![CDATA[<p>
In <a href="http://www.reddit.com/r/PHP/comments/n1pyn/should_i_be_doing_just_about_everything_using_rest/">this new post</a> to Reddit.com, the question is asked "Should I be doing just about everything using REST?" - wondering if their new applications should all sit on top of a web service for their functionality.
</p>
<blockquote>
I'm pretty new to server-side programming, and actually started out with Python/mod-wsgi. From the ground up, mod-wsgi made a lot of sense. The server gets a request, you route the request. It feels like that's where I should start, so that's pretty much what I'm trying to create with PHP (a REST router - for learning purposes, I know frameworks exist). I'm trying to think of a situation where I wouldn't use a REST interface, but I can't seem to think of one (even for simple cases). Would it be safe to say that using REST is a pretty safe bet, most of the time?
</blockquote>
<p>
There's some good discussion and answers to his question touching on things like Service Oriented Architectures, some implications of having a web service power an entire application (or applications) and 
 a few comments with some personal experience.
</p>
<p>A comment about SOA sums it up well:</p>
<blockquote>
You learn to write for your platform in the way developers/partners will have to, so you produce a good quality usable API which encourages development and consumption of your platform.
</blockquote>]]></description>
      <pubDate>Wed, 07 Dec 2011 12:41:38 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[php|architect: Finding Exactly Where You Are]]></title>
      <guid>http://www.phpdeveloper.org/news/17121</guid>
      <link>http://www.phpdeveloper.org/news/17121</link>
      <description><![CDATA[<p>
On the php|architect site today <i>Chris Tankersley</i> has a new tutorial about geocoding, <a href="http://www.phparch.com/2011/11/finding-exactly-where-you-are/">Finding Exactly Where You Are</a> - a guide to integrating the <a href="http://developer.yahoo.com/geo/placefinder/">Yahoo! Placefinder</a> service into your application.
</p>
<blockquote>
Yahoo! PlaceFinder is a REST web service that will turn an address into the latitudinal and longitudinal coordinates in XML, JSON, or serialized PHP objects. It has a few other functions too, like finding the nearest airport, time zone, and even telephone area code. [...] PlaceFinder is a very simple REST service, so cURL is a quick and easy way to access it. There are no authentication tokens to deal with or logon procedures. Just send a GET request, and read the response. 
</blockquote>
<p>
He <a href="https://developer.apps.yahoo.com/dashboard/createKey.html">links you</a> to the service to get an API key and includes a simple class (PlaceFinderAPI) that builds the GET query for you and makes the request via <a href="http://php.net/curl">curl</a>. Also included is an example showing how to find a given location (coincidentally, his location choice is the hotel where the <a href="http://tek.phparch.com">php|tek</a> conferences are held).
</p>]]></description>
      <pubDate>Fri, 11 Nov 2011 12:05:40 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPBuilder.com: Building RESTful Web Services with the Zend Framework]]></title>
      <guid>http://www.phpdeveloper.org/news/17120</guid>
      <link>http://www.phpdeveloper.org/news/17120</link>
      <description><![CDATA[<p>
New on PHPBuilder.com today is a tutorial introducing you to <a href="http://www.phpbuilder.com/columns/RESTful_Web_Services_with_Zend/RESTful_Web_Services_with_Zend_11-03-2011.php3">web services with the Zend Framework</a>, a guide to creating a simple RESTful service with this popular PHP framework.
</p>
<blockquote>
Rather than attempt to build and maintain multiple versions of the Web application in order to accommodate the diverse array of challenges and advantages presented by each device type, developers are increasingly embracing a unified approach which allows them to manage a single server-side code base which communicates with multiple client-specific interfaces by way of a RESTful Web service. The Zend Framework's <a href="http://framework.zend.com/manual/en/zend.rest.html">Zend_Rest</a> component offers PHP developers with an incredibly straightforward approach to building RESTful Web services. 
</blockquote>
<p>
He shows how to set up some internal RESTful routing (with the help of <a href="http://framework.zend.com/manual/en/zend.controller.router.html#zend.controller.router.routes.rest">Zend_Rest_Route</a>) and create a simple controller that responds to several of the major HTTP request types - POST, GET, PUT, etc. In his simple example, he shows how to update a basic TODO list with a POST and the JSON response that would follow.
</p>]]></description>
      <pubDate>Fri, 11 Nov 2011 11:37:45 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[ZendCasts.com: Building a JSON Endpoint with SLIM (Part 1)]]></title>
      <guid>http://www.phpdeveloper.org/news/17044</guid>
      <link>http://www.phpdeveloper.org/news/17044</link>
      <description><![CDATA[<p>
On ZendCasts.com today, the next part of their series looking at using the <a href="http://slimframework.com">Slim microframework</a> has been posted. This is <a href="http://www.zendcasts.com/building-a-json-endpoint-with-slim-part-1/2011/10/">part one</a> of a tutorial building a JSON endpoint for a web service.
</p>
<p>
You'll need some of the base that he created in <a href="http://www.zendcasts.com/slimming-out-your-controller/2011/10/">this previous screencast</a> to follow along (the basic structure, really). His takes his basic "hello world" application and builds on it to add a "model" to pull name data from and has the "/names" action respond with a JSON-formatted message (and an "application/json" content-type). His "model" pulls the data out with findAll() and find() methods.
</p>
<p>
You can <a href="https://gist.github.com/1314258">grab the source</a> to follow along.
</p>]]></description>
      <pubDate>Wed, 26 Oct 2011 10:51:45 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Philip Norton's Blog: Creating A Thumbnail Of A Word Document With PHP And LiveDocx]]></title>
      <guid>http://www.phpdeveloper.org/news/16904</guid>
      <link>http://www.phpdeveloper.org/news/16904</link>
      <description><![CDATA[<p>
In a new post to his blog <i>Philip Norton</i> shares a method for <a href="http://www.hashbangcode.com/blog/creating-thumbnail-word-document-php-and-livedocx-598.html">creating a thumbnail of a Word document</a> with the help of PHP and <a href="http://framework.zend.com/manual/en/zend.service.livedocx.html">LiveDocx</a> (in this case, the component inside the Zend Framework).
</p>
<blockquote>
Creating Word document icons is very simple thanks to a service called LiveDocx. LiveDocx was created as a web service to allow the easy creation of most document formats from a simple template. However, it is possible to send a normal Word document as the template file and get an image of the file in return.
</blockquote>
<p>
You'll need a <a href="https://www.livedocx.com/user/account_registration.aspx">LiveDocx account</a> to be able to use the service - there's a <a href="http://www.livedocx.com/pub/pricing.aspx">free</a> option of their service that uses a shared server. Included in the post is a sample script that defines a LiveDocx connection, pulls in a local Word document for parsing and calls a "getBitmaps" method on the service to return the raw image data. This is pushed into an image (using <a href="http://php.net/gd">GD</a>) as a PNG.
</p>]]></description>
      <pubDate>Mon, 26 Sep 2011 08:50:42 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[H&aring;vard Eide's Blog: ChaosMonkey]]></title>
      <guid>http://www.phpdeveloper.org/news/16873</guid>
      <link>http://www.phpdeveloper.org/news/16873</link>
      <description><![CDATA[<p>
<i>H&aring;vard Eide</i> has a new post sharing a tool he's created (based on some ideas presented in <a href="http://techblog.netflix.com/2010/12/5-lessons-weve-learned-using-aws.html">this netflix blog post</a>) for testing a web service. Specifically, his tool helps you test a web service developed with the <a href="http://www.slimframework.com/">Slim</a> framework.
</p>
<blockquote>
I just pushed a example on how to create a <a href="https://github.com/haavardeide/ChaosMonkey>ChaosMonkey</a> with the <a href="http://www.slimframework.com/">Slim framework</a> to github. The idea is that whenever you create a webservice with the Slim framework (which is really simple) you rarely test for failure, the ChaosMonkey class will help you to do just that. When initialized with the <a href="https://github.com/haavardeide/ChaosMonkey/blob/master/ChaosMonkey/Chaos/AbsoluteChaos.php">AbsoluteChaos</a> plugin it will randomly kill the webservice with exceptions, garbage to the output, or just run the service for you without failure at all.
</blockquote>
<p>
His plugin does a lot of things right now, but it's easy to extend with your own failure types - like his suggested "networkSleep" or something that could kill the connection to MySQL. He includes a <a href="http://eide.org/2011/09/18/chaosmonkey/">code snippet in the post</a> of how to hook Slim and ChaosMonkey together for some testing fun.
</p>]]></description>
      <pubDate>Mon, 19 Sep 2011 09:11:26 -0500</pubDate>
    </item>
  </channel>
</rss>

