Re: [PHP] libcurl (cookies across cURL session). . .?

This is a discussion on Re: [PHP] libcurl (cookies across cURL session). . .? within the PHP General forums, part of the PHP Programming Forums category; Robert, Thanks. The thing is that lots of cookies are set regularly. Are you suggesting that every time I receive ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 09-23-2006
Michael Williams
 
Posts: n/a
Default Re: [PHP] libcurl (cookies across cURL session). . .?

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. |
> `------------------------------------------------------------'
>
>
>

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 12:25 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0