CodeIgniter is becoming well known for its power as a PHP based web application framework, but it's not often that we see examples of it being used for anything else. Today we'll learn how we can use CodeIgniter to create a RESTful API for your existing web applications, and demonstrate how to interact with your own API or other RESTful web-services, such as Facebook and Twitter.
He has the sample code hosted over on his github account where you can pull down the source and follow along from the beginning. His application is created to be flexible enough for multiple output formats (xml, json, html) and respond correctly to the HTTP request types like GET, POST, PUT, DELETE. On the other side he shows how to consume the services via different methods like file_get_contents and cURL.