title: convert long URL to short URL codeigniter
body: <p>I am using codeigniter and need to convert a long URL of a website to short URL's like in Google URL shorter...i cant find anything online for this .Please Help</p>
  
  <p>eg: <a href="http://www.youtube.com/" rel="nofollow">http://www.youtube.com/</a> to <a href="http://goo.gl/fUDP" rel="nofollow">http://goo.gl/fUDP</a></p>
  
  <p>I am already able to put the long URL's into the database and retrieve it but now i need to convert these URL's to short URL's and display to users</p>
  
  <p>MODEL:</p>
  
  <pre><code>'URL'=&gt; $this-&gt;input-&gt;post('URL')
  </code></pre>
  
  <p>VIEW:</p>
  
  <pre><code>URL:&lt;input type="text" name="URL"&gt;
  </code></pre>