cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: curl command (post data question)

From: Linus Nielsen Feltzing <linus_at_haxx.se>
Date: Fri, 04 Sep 2009 07:36:47 +0200

Jagg Crossbone wrote:
> I tried it with the __VIEWSTATE field and also with the complete post data
> (I fetched with "live http headers" addon for firefox) but no chance to get
> "Darstellung:" = 5 and "Zeilen pro Seite:" = 100 :-(

You must probably do it in two steps. First you do a plain GET request
of the front page in order to receive the correct session cookie(s):

1) curl -c cookiejar.txt http://www.handelsblatt.com/default.aspx

Then you extract the hidden form fields (__VIEWSTATE et al) and perform
the POST:

2) curl -b cookiejar.txt -c cookiejar.txt -d "__VIEWSTATE=xxxxx" ...
http://blablablabla...

Linus

-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2009-09-04