Re: libcurl (cookies across cURL session). . .?

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

 



Robert,

Thanks. The thing is that lots of cookies are set regularly. Are you suggesting that every time I receive a "Set-Cookie:" to 1)parse that line out 2)append it to a file 3) retrieve it when necessary? I'm not terribly familiar with the proper format for a cookie, but I'll look into it. I'd appreciate *any* insights you have.

Regards,
Mike

On Sep 23, 2006, at 2:28 AM, Robert Cummings wrote:

On Sat, 2006-09-23 at 02:10 -0400, Michael Williams wrote:
Hi all,

Is there any way at all by which to persist cookies across cURL
sessions?  Basically I have a login page that sets cookies and looks
for them for "logged in" status so that the user may use the site to
their heart's content.  The problem with cURL, however, appears that
after the initial login, any further attempts are foiled by the fact
that the cookies don't remain.  How exactly should I go about doing
this?

You should be able to retrieve the cookies from the response headers.
Then you just need to resend them. There may be an option for cURL to do
this automatically. Search for cookie at the following link (check the
user comments also):

    http://ca.php.net/manual/en/ref.curl.php

Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
`------------------------------------------------------------'




--
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