title: cURL Login Doesn't Set Cookie in Browser
body: <p>I am sure this is a very simple 'problem' that lies entirely in my lack of knowledge.</p>
  
  <p>I have been doing research and testing for a few hours now, and I can't seem to the fix I want.</p>
  
  <p><strong>The Situation:</strong></p>
  
  <p>I have two parts to a web application - a Wordpress front end and a CodeIgniter backend. When someone logs into Wordpress, I need it to also log them into CodeIgniter.</p>
  
  <p>I already have the code in place to fire off a curl POST to the CodeIgniter login function. </p>
  
  <p>The Codeigniter system uses Cookies to store the logged in state. </p>
  
  <p><strong>The Problem:</strong></p>
  
  <p>Although the code goes though, and if I dump the cookie it <strong>appears</strong> to be working in the cURL response, if I use that same browser to visit the CodeIgniter directory, the user is not logged in to the system.</p>
  
  <pre><code>$this-&gt;session-&gt;set_userdata($userdata);
  
  var_dump($this-&gt;session-&gt;userdata('username'));
  </code></pre>
  
  <p>As soon as the above code runs, as part of the script that the cURL script posts to, the correct username for that user is dumped.</p>
  
  <p><strong>New Understanding</strong>  </p>
  
  <p>There is no simple way to do this with curl, due to the reasons so clearly outlined below (thank you). Now I need to find an alternative for performing this simultaneous login.</p>
  
  <p>Any ideas?</p>
  
  <p>Thanks!</p>