curl-users
RE: login POST with php/libcurl
Date: Wed, 7 May 2003 18:54:49 +0200 (CEST)
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.comReceived on 2003-05-07