curl-and-php
Re: cookie jar problem curl and webmin
Date: Sat, 18 Sep 2004 09:22:03 +0200 (CEST)
On Fri, 17 Sep 2004, Ben wrote:
> Always I get:
>
> No cookies
> Your browser does not support cookies, which are required for this web
> server to work in session authentication mode
This proves that the site checks for something, most likely a cookie, that you
don't provide. It might have been set in the page that displays the login
form.
> I am writing my cookiejar to a folder with 777, but my problem is this: the
> file never gets made. So what am I doing wrong?
And you do receive cookies?
> Also, what is the format of this file, so I can force cookies into place?
Netscape/Mozilla cookie file format.
As always, try using the curl command line tool to work out the functionality
first. -c is the cookiejar option.
> curl_close ($ch);
> $ch = curl_init();
If you don't close and re-init, you may not even have to save the cookies to a
file, and just let curl keep them in memory.
-- Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se Dedicated custom curl help for hire: http://haxx.se/curl.htmlReceived on 2004-09-18