News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Lorna Mitchell's Blog:
Building A RESTful PHP Server Understanding the Request
January 19, 2012 @ 10:02:18

In this new post to her blog Lorna Mitchell starts off a new series (based on popular demand) looking at building an RESTful server in PHP. Back to basics - no framework, just PHP.

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.

Her "basics" include:

  • the routing to send everything to the main index file (a "front controller" of sorts) with the .htaccess settings included
  • Handling the incoming request with a "Request" class
  • Parsing the incoming parameters from the "php://input" stream

0 comments voice your opinion now!
restful rest webservice request htaccess index


blog comments powered by Disqus

Similar Posts

Raphael Stolt's Blog: Using the Zend Framework plugins for server-sided Ajax request identification

Martin Sikora's Blog: Symfony 1.4 on shared webhosting

NETTUTS.com: Using htaccess Files for Pretty URLS

Kevin Schroeder's Blog: You want to do WHAT with PHP? Chapter 2

DevShed: Fetching Search Results as Serialized Arrays with Yahoo Web Services and PHP 5


Community Events

Don't see your event here?
Let us know!


performance community library extension api version voicesoftheelephpant podcast framework release laravel opinion symfony2 series conference introduction application example php7 interview

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework