cURL / Mailing Lists / curl-users / Single Mail

curl-users

Easy "POST" question but cannot figure it out!!

From: <jon_at_linertia.com>
Date: Wed, 14 Nov 2007 11:06:45 -0800 (PST)

Hi all,

Here is the very very simple form that I am trying to automate login to:

<form method="post" action="">
<h2>Please enter your email address and password</h2>
<p>Email: <input type="text" name="email" maxlength="255" />&nbsp;
Password: <input type="password" name="password" />
<input type="submit" name="login" value="Log in" />
</p>
<p><input type="checkbox" name="remember_me" /> Remember Me</p>
</form>

I also changed the method of POST to GET (to see what is posted to the
server) and the results are:

www.example.com/index.html?email=email%40email.com&password=pass&login=Log+in

so now that I know what data is being sent, I use the following command line:

curl -c cookie -d
"/index.html?email=email%40email.com&password=pass&login=Log+in"
www.example.com/index.html

For some reason, this does NOT work! I use the verbose option in curl and
this is what I see in one of the lines:

email=email%40email.com&password=pass&login=Log+in< HTTP/1.1 404 Not Found

Anybody have any ideas? You guys are great!
Received on 2007-11-14