title: Curl in codeigniter
body: <p>I want to use curl in my codeigniter application. But I am getting null array.</p>
  
  <p>My code is like this:</p>
  
  <pre><code>$this-&gt;load-&gt;library('curl');
  $url = "http://url/checkweb.php"; 
  $post_data = array ( 
      "foo" =&gt; "bar", 
      "query" =&gt; "Nettuts", 
      "action" =&gt; "Submit" 
  );
  $output = $this-&gt;curl-&gt;simple_post($url, $post_data);
  </code></pre>
  
  <p><code>checkweb.php</code>:</p>
  
  <pre><code>print_r($_POST);
  </code></pre>
  
  <p>now actually I want to pass current url and it will check that its in my private database and if it is there then its ok else it will redirect to google.com because my code can't be copied on other domain</p>