cURL / Mailing Lists / curl-users / Single Mail

curl-users

problems with posting

From: Murray Patterson <murray.patterson_at_gmail.com>
Date: Mon, 21 Feb 2005 09:13:48 +0000

Hi,

I'm new to curl, but it makes a fair amount of sense to me, and I just
have something simple to do. I'm trying to access a site where I have
to put a username and password into a form and post it to the server
so that I can get to the next page. I'm pretty sure that this can be
done with the '-d' option. With this option, in the "automating HTTP
jobs" page it mentions that form may look like:

<form method="POST" action="junk.cgi">
   <input type=text name="birthyear">
   <input type=submit name=press value=" OK ">
</form>

and to put in a birthyear and press the button, you respond with:

curl -d "birthyear=1905&press=%20OK%20" www.hotmail.com/when/junk.cgi

well the form on the webpage that I'm trying trying to fill looks like:

<form action="https://www.dyndns.org/account/services/dyndns/doublethink.ath.cx"
method="post">
   <input type="hidden" name="__login" value="1" />
   <label for="username">
   User: <input type="text" name="username" id="username" size="14"
value="murraypatterson" />
   </label>
   <label for="password">
   Pass: <input type="password" name="password" id="password" size="14" />
   </label>
   <input type="submit" value="Login" />
</form>

the problem is that the button has no name (unlike in the first
example where the button had the name "press"), so I'm not sure how to
actually effectively "click" this button. Any Ideas?

thanks,
Murray
Received on 2005-02-21