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

curl-and-php

Re: setting a new cookie in curl

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 6 Dec 2005 12:22:14 +0100 (CET)

On Mon, 5 Dec 2005, Colleen R. Dick wrote:

> Thank you for your answer I understand everything you said except the
> COOKIELIST. which I can't use anyway from php right?

I don't know. Can you?

> What still I don't understand is why is there no cookie called cookiename in
> the cookies attached to mydom.com

I don't follow the terminology here. How are cookies "attached" to a domain
and how does PHP/CURL relate to that?

You mean it doesn't send the cookies you expect it to?

> $ch=curl_init("http://www,mydom.com/myfile.php");
> $pf = .... //postfields work fine
> curl_setopt($ch,CURLOPT_POST,1);
> curl_setopt($ch,CURLOPT_POSTFIELDS,$pf);
> curl_setopt($ch,CURLOPT_COOKIE,"cookiename=YES");
> $f = curl_exec($ch);

You can easily enable VERBOSE to see how PHP/CURL's request looks like and the
Cookie: header it contains and judge for yourself. Or run a network analyzer
thing on the server end to see the incoming request's details.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2005-12-06