RE: [PHP] Curl and cookies
| From: | Marcus | Date: | Fri, 15 Dec 2006 14:42:47 +0000 |
| Subject: | RE: [PHP] Curl and cookies | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-245865@lists.php.net to get a copy of this message | ||
1. Set option "HEADER" true for the login part in Curl
2. Take the output of login page, you will notice Set-cookie:
name=cookie_value; parametres returned from the header.
3. Preg match or use (explode,str_replace etc) to get those names and
values. Prepare them for the next Curl fetch
4. Make a new call to a new page, using the cookies with curl option COOKIE.
--aras
-----Original Message-----
From: Fernando M. M. [mailto:stormrider@tifacil.com.br]
Sent: Friday, December 15, 2006 4:07 PM
To: php-general@lists.php.net
Subject: [PHP] Curl and cookies
Hello,
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?
Thanks,
Fernando.
--
Blog:
http://blog.forumdebian.com.br/fernando
Contato:
http://www.forumdebian.com.br/fernando/contato.php