title: Create a web service with CodeIgniter
body: <p>im using CodeIgniter 1.7 framework to make my Website.
  Another team do the mobile version for iPhone.
  So the other team ask me to do a web service for authentification.
  They tell that they will send me :</p>
  
  <pre><code>POST REQUEST 
  Input : login , password, push_token
  if failure authentification -&gt; Output HTTP : error code 0
  if success -&gt; Output XML :
  &lt;DATA&gt;
   &lt;User id='id_user' title='..' first_name='' last_name='' email='' postal='' country_id=''/&gt; 
  &lt;/DATA&gt;
  </code></pre>
  
  <p>Basically i have this function for authentification:</p>
  
  <pre><code>function check_login($username="", $password="")
  {
  $username = $_POST['username'];
  $password = $_POST['password'];
  ...
  ...
  }
  </code></pre>
  
  <p>im looking into this post <a href="https://stackoverflow.com/q/9696009/874800">Codeigniter web services</a> but i don't understand how its really work because im new in webservice. </p>