curl-users
RE: login POST with php/libcurl
Date: Wed, 7 May 2003 20:38:10 -0400
Thanks again for your response Daniel. I am having trouble getting
formfind.pl v1.5 to work; my output is different from yours. All of my
inputs say "[weird]" and not the variable names. I tried "wget
http://www5.apa.org/membership/login/login.cfm" and then ./formfind.pl <
login.cfm. It looks like a very useful utility, though.
As for UserLogin/UserPassword values, how do I find out what they should
be? I tried leaving them null and with text but it doesn't work.
One more question. One example on the web site using the command line
curl it suggested to use press=OK. But in this situation you said I
didn't need a press=Login. Is that because CURLOPT_POST is set to 1
which means it will submit the form without "press" being set?
Thank you,
Joe Glass
-----Original Message-----
From: curl-users-admin_at_lists.sourceforge.net
[mailto:curl-users-admin_at_lists.sourceforge.net] On Behalf Of Daniel
Stenberg
Sent: Wednesday, May 07, 2003 12:55 PM
To: Curl Mailinglist
Subject: RE: login POST with php/libcurl
On Wed, 7 May 2003, Joseph Glass wrote:
> $id = "username";
> $pw = "password";
> $postfields = "UserLogin=$id&UserPassword=$pw&press=login";
You seem to be guessing here. Have to analyzed the <form> tag closely?
Formfind reports this on the form:
--- FORM report. Uses POST to URL "/membership/login/login.cfm"
Input: UserLogin_required (HIDDEN)
Input: UserPassword_required (HIDDEN)
Input: UserLogin (TEXT)
Input: UserPassword (PASSWORD)
Button: "Login" (SUBMIT)
--- end of FORM
So you should use a string similar to this:
"UserLogin_required=&UserPassword_required=&UserLogin=$id&UserPassword=$
pw"
... and you should take care to have the name and password URL-encoded.
At least, there should be no 'login' button, but the two <input> tags
without
value you need to check how they actually work.
-- Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs. ------------------------------------------------------- Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara The only event dedicated to issues related to Linux enterprise solutions www.enterpriselinuxforum.com ------------------------------------------------------- Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara The only event dedicated to issues related to Linux enterprise solutions www.enterpriselinuxforum.comReceived on 2003-05-08