cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Re: CURL, POST an Cookies???- AGAIN!!!

From: Alexei Zoubov <tech_at_alexeiz.com>
Date: Sun, 23 Nov 2003 23:51:05 -0800

Thanks!

I have to say that it is actually a second submission. In the first one
I got the names of the cookies and then in this one pass it back

Doesn't work either. I submitted here the second posting, that is in
the same script. I also tried CURLOPT_COOKIEJAR and COOKIEFILE - no
difference.

I will post the whole script tomorrow.

On Sunday, November 23, 2003, at 10:53 PM, Daniel Stenberg wrote:

> On Sun, 23 Nov 2003, Alexei Zoubov wrote:
>
>> I REALLY need help - does anybody has any idea?
>>
>> $post_arr = array (username =>'alexeiz' ,password =>'GOVNO');
>> $c = curl_init('http://www.sampledomain.com/login.php');
>> curl_setopt($c,CURLOPT_VERBOSE,1);
>> curl_setopt($c, CURLOPT_POSTFIELDS, $post_arr);
>> curl_setopt($c,CURLOPT_COOKIE,'username=alexeiz; password='GOVNO');
>> curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
>> $page = curl_exec($c);
>> curl_close($c);
>>
>> This script does login correctly. But it also supposed to set cookies
>> on the client that triggers this script and it does NOT!
>
> This script does not "set cookies on the client". It passes cookies to
> the
> server. Nothing else.
>
>> These cookies are needed so in the next CURL call the client can
>> access
>> other pages at www.sampledomain.com that require these cookies to
>> authorize
>> the client.
>
> Then you need to post those cookies in the next request, not in this
> one.
>
>> Is there anything wrong here, and if it is, how to achieve this goal?
>
> Something is wrong since you can't make it work. I don't think it is a
> bug in
> curl though.
>
> --
> Daniel Stenberg -- http://curl.haxx.se/ -- http://daniel.haxx.se/
> [[ Do not post private mails to this email address. They won't reach
> me. ]]
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback Program.
> Does SourceForge.net help you be more productive? Does it
> help you create better code? SHARE THE LOVE, and help us help
> YOU! Click Here: http://sourceforge.net/donate/
>

-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
Received on 2003-11-24