Creating a RESTful API in PHP