Re: Curl and cookies

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, December 15, 2006 8:06 am, Fernando M. M. wrote:
> I have just started using curl and i have some question about
> cookies.
>
> The website i'm logging in controls everything using cookies (from
> login to the actions inside it).
>
> Is there a way to store the cookie values
> into a php session variable ($_SESSION['cookie'])?
>
> How do i make curl receive
> the cookie and store in this variable?
>
> How do i make curl send it?

Option #1.
Use the HEADER option in curl to get all the headers, and you can see
the cookies, parse them, send them back with more header options.

Option #2.
Use the COOKIE_FILE and COOKIE_JAR option and let curl accept/send the
cookies for you, automatically.

Last time I tried it, these were mutually exclusive.  You could
automate the cookies and get no headers, or you could get headers and
do all the cookies for yourself, but not get the headers and have curl
handle the cookies while you did something interesting with the other
headers.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux