cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: I cannot use curl for submit a form

From: Everton Zanella Alvarenga <everton137_at_gmail.com>
Date: Thu, 15 Jan 2009 16:58:54 -0200

Hi, Daniel!

2009/1/15 Daniel Stenberg <daniel_at_haxx.se>:
> On Thu, 15 Jan 2009, Everton Zanella Alvarenga wrote:
>
>> I tried this curl command:
>>
>> $ curl -b cookies.txt -d "user=LOGIN&pass=PASSWD" -L
>> http://www1.folha.uol.com.br/fsp/opiniao/fz1401200904.htm
>
> The form uses several hidden fields and you probably need to pass them on as
> well. Use LiveHTTPHeaders to see what a firefox sends and send the same with
> your command.

Thank you for the answer! I used LiveHTTPHeaders
<http://livehttpheaders.mozdev.org/> and figured out how to do it. :-)
The correct command is:

$ curl -b cookies.txt -d
"skin=conteudo%2Ffolha&dest=CONTENT&url=http%3A%2F%2Fwww1.folha.uol.com.br%2Ffsp%2Fopiniao%2Ffz0101200701.htm&sc=040272DCB913A68C993460C8992326&user=LOGIN&pass=PASSWORD"
-L http://www1.folha.uol.com.br/fsp/opiniao/fz0101200701.htm

Maybe it'd be good to recommend LiveHTTPHeaders in the curl manual. I
read about it, but didn't realize I had to do this.

Hugs!

Tom

-- 
http://stoa.usp.br/tom
-------------------------------------------------------------------
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-01-15