I don't know if you can do what you are asking for, but you could get
around it a little bit. In the curl request you specify the cookie file
and the cookie jar file. Once you have made your requests, you could
read them with file_get_contents() and put that into a $_SESSION
variable. You could
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
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
What about taking advantage of curl's built in cookie functions?
In particular, you should look at doing this with a two step process
utilizing the CURLOPT_COOKIEJAR and CURLOPT_COOKIEFILE functions. First,
log in... Then grab the article itself, once the session has begun.
$ch = curl_init();
4 matches
Mail list logo