FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » php curl only saves a cookie with tempnam()
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
php curl only saves a cookie with tempnam() [message #180751] Sat, 16 March 2013 18:23 Go to previous message
doug[1] is currently offline  doug[1]
Messages: 10
Registered: March 2013
Karma:
Junior Member
$tmpfile = tempnam('/tmp', 'CURL_tempnam_');
d($tmpfile); //string: /tmp/CURL_tempnam_lpeeqs --random string on end

$tmpfile = '/tmp/CURL_var';
d($tmpfile); //string: /tmp/CURL_var

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_COOKIEFILE, $tmpfile);
curl_setopt($ch, CURLOPT_COOKIEJAR, $tmpfile);
[...]

A cookie will be saved with the randomized name, even though I am setting the $tmpfile again. If I comment the

$tmpfile = tempnam('/tmp', 'CURL_tmpfile');

no cookie will be saved. What gives?
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: all done
Next Topic: validation of a text box input...
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 26 01:37:28 GMT 2024

Total time taken to generate the page: 0.03292 seconds