title: How do I inject cookies when using a cookie jar in CURL?
body: <p>I am using php curl and i am using the cookie jar for a multi-step crawl. I need the dynamically generated cookies from the server.</p>
  
  <p>But at one step some cookies are generated using javascript. Since curl doesn't run javascript I need to inject cookies to curl at this point.</p>
  
  <p>The only way I can see doing this is manually reading the cookie file, and setting all the cookies plus the ones I want using <code>curl_Setopt</code> and <code>CURLOPT_COOKIE</code>.</p>
  
  <p>Is there a way to inject cookies without loosing the ones already there?</p>