<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Create a REST API with PHP</title>
	<atom:link href="http://www.gen-x-design.com/archives/create-a-rest-api-with-php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gen-x-design.com/archives/create-a-rest-api-with-php/</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Thu, 04 Feb 2010 05:00:37 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Edwin</title>
		<link>http://www.gen-x-design.com/archives/create-a-rest-api-with-php/#comment-2047</link>
		<dc:creator>Edwin</dc:creator>
		<pubDate>Thu, 04 Feb 2010 03:17:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.gen-x-design.com/?p=235#comment-2047</guid>
		<description>Great article, I&#039;d like to see your personal framework with this. Can you share please?</description>
		<content:encoded><![CDATA[<p>Great article, I&#8217;d like to see your personal framework with this. Can you share please?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JimboZ</title>
		<link>http://www.gen-x-design.com/archives/create-a-rest-api-with-php/#comment-2043</link>
		<dc:creator>JimboZ</dc:creator>
		<pubDate>Mon, 01 Feb 2010 00:36:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.gen-x-design.com/?p=235#comment-2043</guid>
		<description>Fantastic article mate. I searched the net for ages with utter rubbish until I came across this. One thing though isn&#039;t it defaulting to XML at the line:

$this-&gt;http_accept       = (strpos($_SERVER[&#039;HTTP_ACCEPT&#039;], &#039;json&#039;)) ? &#039;json&#039; : &#039;xml&#039;;

and not JSON? Or am I missing something simple?

Thanks for the help mate just this bit is confusing me.</description>
		<content:encoded><![CDATA[<p>Fantastic article mate. I searched the net for ages with utter rubbish until I came across this. One thing though isn&#8217;t it defaulting to XML at the line:</p>
<p>$this-&gt;http_accept       = (strpos($_SERVER['HTTP_ACCEPT'], &#8216;json&#8217;)) ? &#8216;json&#8217; : &#8216;xml&#8217;;</p>
<p>and not JSON? Or am I missing something simple?</p>
<p>Thanks for the help mate just this bit is confusing me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mahmud Ahsan</title>
		<link>http://www.gen-x-design.com/archives/create-a-rest-api-with-php/#comment-2035</link>
		<dc:creator>Mahmud Ahsan</dc:creator>
		<pubDate>Sun, 24 Jan 2010 12:30:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.gen-x-design.com/?p=235#comment-2035</guid>
		<description>I&#039;ve read several articles about REST in net and I found it&#039;s one of the best article among them. Good Work!</description>
		<content:encoded><![CDATA[<p>I&#8217;ve read several articles about REST in net and I found it&#8217;s one of the best article among them. Good Work!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: triggerman72</title>
		<link>http://www.gen-x-design.com/archives/create-a-rest-api-with-php/#comment-2031</link>
		<dc:creator>triggerman72</dc:creator>
		<pubDate>Sat, 23 Jan 2010 02:34:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.gen-x-design.com/?p=235#comment-2031</guid>
		<description>Not only is this very informative, but so thorough...seriously, nobody is posting big posts like this one..so thanks. And your info will wind up being a catalyst for me. I too would like the implementation you mentioned. Thanks again for the great post!</description>
		<content:encoded><![CDATA[<p>Not only is this very informative, but so thorough&#8230;seriously, nobody is posting big posts like this one..so thanks. And your info will wind up being a catalyst for me. I too would like the implementation you mentioned. Thanks again for the great post!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon</title>
		<link>http://www.gen-x-design.com/archives/create-a-rest-api-with-php/#comment-2026</link>
		<dc:creator>Jon</dc:creator>
		<pubDate>Wed, 20 Jan 2010 22:59:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.gen-x-design.com/?p=235#comment-2026</guid>
		<description>This is the best article I have read on REST APIs and it helped a lot.  I was wondering if I could get a copy of the final implementation?</description>
		<content:encoded><![CDATA[<p>This is the best article I have read on REST APIs and it helped a lot.  I was wondering if I could get a copy of the final implementation?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andre</title>
		<link>http://www.gen-x-design.com/archives/create-a-rest-api-with-php/#comment-2003</link>
		<dc:creator>Andre</dc:creator>
		<pubDate>Mon, 28 Dec 2009 14:25:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.gen-x-design.com/?p=235#comment-2003</guid>
		<description>awsome share man!
i&#039;ve been wondering how to make my java apps communicate with my web apps and this is definately the way forward.  this is a wonderful starting app and really useful
this has helped a great deal thank you</description>
		<content:encoded><![CDATA[<p>awsome share man!<br />
i&#8217;ve been wondering how to make my java apps communicate with my web apps and this is definately the way forward.  this is a wonderful starting app and really useful<br />
this has helped a great deal thank you</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://www.gen-x-design.com/archives/create-a-rest-api-with-php/#comment-2002</link>
		<dc:creator>David</dc:creator>
		<pubDate>Sun, 27 Dec 2009 12:00:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.gen-x-design.com/?p=235#comment-2002</guid>
		<description>I wasn&#039;t able to send a simple &quot;get&quot; response.  Please help.  Great article for learning rest api with PHP.

class Restutils
//etc
class RestRequest
//etc
$data = RestUtils::processRequest();
switch($data-&gt;getMethod)
{
  case &#039;get&#039;:
    $user_list = &quot;test response&quot;;
    RestUtils::sendResponse(200,json_encode($user_list),&#039;application/json&#039;);
    break;
  case &#039;post&#039;;
    //etc
}

On the request side:
class RestRequest
//etc
$request = new RestRequest(&#039;http://localhost/api/index.php&#039;, &#039;GET&#039;);
$request-&gt;execute();
echo &#039;&#039; . print_r($request, true) . &#039;&#039;;

on the response in the browser:
[responseBody:protected] =&gt;  (It&#039;s empty, I was expecting &quot;testing response&quot;.)
[content_type] =&gt; text/html; charset=UTF8 (I was expecting &quot;application/json&quot;.)
[http_code] =&gt; 200

Happy holidays!</description>
		<content:encoded><![CDATA[<p>I wasn&#8217;t able to send a simple &#8220;get&#8221; response.  Please help.  Great article for learning rest api with PHP.</p>
<p>class Restutils<br />
//etc<br />
class RestRequest<br />
//etc<br />
$data = RestUtils::processRequest();<br />
switch($data-&gt;getMethod)<br />
{<br />
  case &#8216;get&#8217;:<br />
    $user_list = &#8220;test response&#8221;;<br />
    RestUtils::sendResponse(200,json_encode($user_list),&#8217;application/json&#8217;);<br />
    break;<br />
  case &#8216;post&#8217;;<br />
    //etc<br />
}</p>
<p>On the request side:<br />
class RestRequest<br />
//etc<br />
$request = new RestRequest(&#8217;http://localhost/api/index.php&#8217;, &#8216;GET&#8217;);<br />
$request-&gt;execute();<br />
echo &#8221; . print_r($request, true) . &#8221;;</p>
<p>on the response in the browser:<br />
[responseBody:protected] =&gt;  (It&#8217;s empty, I was expecting &#8220;testing response&#8221;.)<br />
[content_type] =&gt; text/html; charset=UTF8 (I was expecting &#8220;application/json&#8221;.)<br />
[http_code] =&gt; 200</p>
<p>Happy holidays!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Satya Prakash</title>
		<link>http://www.gen-x-design.com/archives/create-a-rest-api-with-php/#comment-1999</link>
		<dc:creator>Satya Prakash</dc:creator>
		<pubDate>Wed, 23 Dec 2009 10:51:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.gen-x-design.com/?p=235#comment-1999</guid>
		<description>I read the half and it is good. wish to read it fully later</description>
		<content:encoded><![CDATA[<p>I read the half and it is good. wish to read it fully later</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nizzy</title>
		<link>http://www.gen-x-design.com/archives/create-a-rest-api-with-php/#comment-1992</link>
		<dc:creator>Nizzy</dc:creator>
		<pubDate>Tue, 01 Dec 2009 20:07:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.gen-x-design.com/?p=235#comment-1992</guid>
		<description>Hi Ian,

I liked your post and I like to see how you extend this class onto other classes.

Could you please share your implementation with me?

thanks
Nizzy</description>
		<content:encoded><![CDATA[<p>Hi Ian,</p>
<p>I liked your post and I like to see how you extend this class onto other classes.</p>
<p>Could you please share your implementation with me?</p>
<p>thanks<br />
Nizzy</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dim</title>
		<link>http://www.gen-x-design.com/archives/create-a-rest-api-with-php/#comment-1984</link>
		<dc:creator>Dim</dc:creator>
		<pubDate>Sun, 22 Nov 2009 12:43:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.gen-x-design.com/?p=235#comment-1984</guid>
		<description>Do you know Is there any good tutorial about auth for RESTful services? How to arrange a public-key encryption in the way Amazon does, for example? Or any other way of doing it (basic, digest, etc..) Thanks!</description>
		<content:encoded><![CDATA[<p>Do you know Is there any good tutorial about auth for RESTful services? How to arrange a public-key encryption in the way Amazon does, for example? Or any other way of doing it (basic, digest, etc..) Thanks!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
