title: GET url in Codeigniter
body: <p>I am using codeigniter for my project. To get the uri segments I know I can use </p>
  
  <pre><code>$this-&gt;uri-&gt;segment();
  </code></pre>
  
  <p>but my case is a bit different</p>
  
  <p>My url looks like</p>
  
  <pre><code>localhost/mediabox/home/box/21
  </code></pre>
  
  <p>but once I go to this url a popup form apears in which the user provide a key to access this page and I validate the key using ajax method which is inside my home controller validate_key function</p>
  
  <p>when I echo the url it gives me localhost/home/validate_key</p>
  
  <p>while calling valiate_key of the home controller how can I get the 21 from the url wrritten in the url bar?</p>
  
  <p>Any ideas?</p>
  
  <p>Thanks</p>