title: curl use browser cookie for chrome extension
body: <p>Im trying to do a chrome extension which allows users to share images on a social website. The problem im having is that i dont want to ask for user passwords and making a request from another website creates a No 'Access-Control-Allow-Origin' situation.</p>
  
  <p>So i figure that maybe i could save the document.cookie to the chrome extension and then make a post request from javascript to my own server, from there i will make a curl request using the cookie i saved plus the image information to be shared.</p>
  
  <p>So far, i tried to save the cookie to a .txt file and load it like this:</p>
  
  <p>curl_setopt ($ch, CURLOPT_COOKIEJAR, dirname(<strong>FILE</strong>).'/'."cookie.txt");</p>
  
  <p>But its not working, its like im not logged in.</p>
  
  <p>How should i make curl use the cookie obtain on the browser?</p>
  
  <p>Thanks</p>