cURL / Mailing Lists / curl-users / Single Mail

curl-users

CURL session login problem ...

From: dara burke <daraburke78_at_yahoo.com>
Date: Thu, 20 Jul 2006 09:00:57 -0700 (PDT)

I'm curl'ing a site, providing my username and password and then storing the cookie in cookie.txt. Some sites seem to have a feature whereby you can't get a valid login session cookie unless you have a normal session cookie already. So that you can't go straight to the login page and login, if you don't have some kinda session cookie for the site already.

If you try to log in without the other cookie, it'll tell you that your login failed and it'll issue you with a session cookie. When you press submit again, with the same details it'll log you in.

Now the bug here is that curl won't seem to provide a login cookie to the server, at the same time as taking a login cookie from the server. So it's not possible to curl these sites ?

curl -d "Femail=my_email&Fpasswd=my_pass&Flogin_x=Log+In" -b cookie.txt -A 'Mozilla/4.05 [en] (X11; U; Linux\ 2.0.32 i586)' -c cookie.txt -e www.teflasia.com/member/member/login.html http://www.teflasia.com/member/login.html

It's definitely not just a non-browser issue. If I go straight to the login page with my browser, but without a session cookie, it won't log me in. Then for the second login, if I delete the cookie, it won't log me in either ... this can go on ad infinitum. It's definitely a session cookie thing. The browser seems to be able to provide it, but curl doesn't ..

 __________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Received on 2006-07-20