curl-users
Re: Posting form containing a hidden field with a very long string value
Date: Fri, 5 Jan 2007 00:06:48 +0100 (CET)
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.htmlReceived on 2007-01-05