note 85747 deleted from function.curl-setopt by datibbaw

From: Date: Tue, 18 Mar 2014 02:31:19 +0000
Subject: note 85747 deleted from function.curl-setopt by datibbaw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-198950@lists.php.net to get a copy of this message
Note Submitter: rkirilow at gmail dot com ---- Some of you may noticed that curl is not transferring cookies between sequent calls to a host. This is because you must activate curl`s "cookie parser". That is achieved using an external file like this: <?php curl_setopt(CURLOPT_FILE, '/tmp/cookies_file'); ?> If you don`t need to read any cookies but you still want the "cookie parser" use the same code but with dummy file with no data like '/dev/null', that way curl is storing cookies internaly per curl_handle: <?php curl_setopt(CURLOPT_FILE, '/dev/null'); ?> [EDIT BY danbrown AT php DOT net: In a note dated 26-SEP-08, (adamplumb AT gmail DOT com) offered the following addendum: [It] should really be CURLOPT_COOKIEFILE. I was bitten by this issue myself with code that previously worked for logging into a website and posting a form. However, at some point the code just stopped working, and I eventually found that I needed to set this option to /dev/null for it to work. ]

« previous php.notes (#198950) next »