title: How to build a RESTful API?
body: <p>The issue is this:
  I have a web application that runs on a PHP server. I'd like to build a REST api for it.<br>
  I did some research and I figured out that REST api uses HTTP methods (GET, POST...) for certain URI's with an authentication key (not necessarily) and the information is presented back as a HTTP response with the info as XML or JSON (I'd rather JSON).</p>
  
  <p>My question is:</p>
  
  <ol>
  <li>How do I, as the developer of the app, build those URI's? Do I need to write a PHP code at that URI?  </li>
  <li>How do I build the JSON objects to return as a response?</li>
  </ol>