cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Re: Getting and passing a cookie...

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 17 Feb 2003 14:25:21 +0100 (CET)

On Mon, 17 Feb 2003, Paperstuff.com wrote:

> Ok, it is 5 am and I just spent 7 hour straight on this. Need to get some
> sleep... What is really odd is that if I put my password or something in
> WRONG, it spits out the cookies and I can see them. Yet, if I put the info
> in correctly, you cannot see the cookies. It looks like there are two.
> Further, I see I am using 7.9.7. Have things changed to where it explains
> why this won't work?

Yes, there have been cookie parsing bug fixes since then.

> The header I provided is the only one. Should there be two or something?

Well, those headers didn't contain any set cookies so therefore I asked. If
it returns saying you lack cookies, it means it expected THIS request to pass
on cookies which you apparently didn't. Perhaps you need to get a previous
page first to get an initial set of cookies that is then passed on when you
get this page?

Many sites work that way and when I do things like this, I usally have curl
load the login-form HTML page first, which also makes it behave even more
like a true web browser.

-- 
 Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs.
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2003-02-17