cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: Posting form containing a hidden field with a very long stringvalue

From: Ferry Ie <ferry.ie_at_optusnet.com.au>
Date: Fri, 5 Jan 2007 21:28:00 +1100

Hi,

Thanks for the reply. But how am I suppose to do this from the command line?
I am running this on Windows and my command line imposes a limit on the
number of characters that I can type in :(.

Cheers,
Ferry

-----Original Message-----
From: curl-users-bounces_at_cool.haxx.se
[mailto:curl-users-bounces_at_cool.haxx.se] On Behalf Of Daniel Stenberg
Sent: Friday, 5 January 2007 10:07 AM
To: the curl tool
Subject: Re: Posting form containing a hidden field with a very long
stringvalue

On Thu, 4 Jan 2007, Ferry Ie wrote:

> I am a curl newbie and am having a problem trying to post a form
containing
> a hidden field with a very long string value. I?ve been playing around
with
> this for days and am wondering if anyone can help. Kind of desperate now
> :-). The following explains what I am trying to do:

[...]

> As you can see from the above, a field called ?__VIEWSTATE? has a very
long
> string value. My question is: how do I emulate this using the curl command
> line. I tried the following:
>
> curl -F
"__VIEWSTATE=@viewstate.txt;type=application/x-www-form-urlencoded"
> -F "_ctl0:SearchMoreCriteria1:zuessearchToBuy=2121" -F
> "_ctl0:SearchMoreCriteria1:zeusSearch=Search" -A "Mozilla/5.0 (Windows; U;
> Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1"
HYPERLINK
>
"http://www.domain.com.au/DomainDefault.aspx"http://www.domain.com.au/Domain
> Default.aspx

-F is not the right option, -d is. Then you just fill in all the post data,
including the extremely long hidden field.

LiveHTTPHeaders is your friend here too.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.16.5/616 - Release Date: 4/01/2007
1:34 PM
 
-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.16.5/616 - Release Date: 4/01/2007
1:34 PM
 
Received on 2007-01-05