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
Re: php curl only saves a cookie with tempnam() [message #180760 is a reply to message #180751] Sat, 16 March 2013 22:48 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
On 3/16/2013 2:23 PM, doug(at)dougcassidy(dot)com wrote:
>
>
> $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?
>

Did you copy/paste your code? Or did you type it in again?

The code you show should not do this. I highly suspect you left
something (a lot?) out.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
[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: Thu Nov 14 19:20:37 GMT 2024

Total time taken to generate the page: 0.04086 seconds