curl-users
newbie--problem with POST
Date: Thu, 31 Oct 2002 03:01:21 -0800 (PST)
I'm trying to automate the submission of a form and having problems. Here's how the process works with a browser: Log into site with username and password. Once logged in, click link to select appropriate page. Click Submit button on form.
The html for the form looks something like this:
<form action="?sp-id=0011da71-sp10024a7&sp-efn=full&sp-fn=index" method=POST>
<table width="100%" cellpadding=2 cellspacing=0 border=0>
<tr>
<td align=left valign=middle width="30%"><input type=Submit name=index value="Index Now"></td>
<td valign=middle width="30%"><input name="sp-cache" type=checkbox value=1><span class=blacktext>Clear index cache</span></td>
<td valign=middle width="30%"><input name="sp-count" type=checkbox value=1><span class=blacktext>Count all pages</span></td>
</tr>
</table>
</form>
When I use a browser the url for the page looks like this:
https://center.atomz.com/center/search/index/?sp-efn=full&sp-id=0011da71-sp10024a7
So, this is the curl command I used:
curl -d "sp-id=0011da71-sp10024a7&sp-efn=full" -o "ja_curl.html" -u "myusername:mypassword" "https://center.atomz.com/center/search/index/?"
The problem is that the resulting page is always "Page not found: The requested URL /center/search/index/ was not found on this server."
Interestingly, if I leave the -u "myusername:mypassword" off, it does pull a page from the server, but it's a page requesting me to log in.
Any ideas what I'm doing wrong? Thanks.
--Jeff
---------------------------------
Do you Yahoo!?
HotJobs - Search new jobs daily now
-------------------------------------------------------
This sf.net email is sponsored by: Influence the future
of Java(TM) technology. Join the Java Community
Process(SM) (JCP(SM)) program now.
http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en
Received on 2002-10-31