RWJDCom
asked on
cURL Cookie Storage Question
I have a script using cURL to login to a web site that uses cookies to store login information and grabs several bandwidth usage images (charts).
Now, this is the setting that I have in my script that sets the cookiejar file...
curl_setopt($ci, CURLOPT_COOKIEJAR, "/tmp/cookies.txt");
Since the login form gets submitted everytime I run the script, would it be possible to store the cookiejar in memory rather than in a file? I'd rather store the cookies in memory than in a file.
Thanks,
Jeff
Now, this is the setting that I have in my script that sets the cookiejar file...
curl_setopt($ci, CURLOPT_COOKIEJAR, "/tmp/cookies.txt");
Since the login form gets submitted everytime I run the script, would it be possible to store the cookiejar in memory rather than in a file? I'd rather store the cookies in memory than in a file.
Thanks,
Jeff
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I'm not really concerned about security, I just don't want to have a file for the cookies...
ASKER
I'm going to check out that memory module.
If it actaully is the case that curl cannot suport this, then you can use stream_wrappers and use
curl_setopt($ci, CURLOPT_COOKIEJAR, "var://cookie");
This based on the streamwrapper for var:// as defined in http://php.net/manual/en/function.stream-wrapper-register.php
-r-