You are not logged in.

#1 2013-02-03 12:06:34

Mindstormscreator
Member
Registered: 2012-07-01
Posts: 165

CURL help: Submitting post form

Apparently this is more complicated than I think:

I want to post an "answer" on Yahoo answers:

curl --cookie cjar --data "answer=something&submit-button=Submit" http://answers.yahoo.com/question/answer?qid=20130131235603AAuPnZi

This appears to fill out the textarea, but does not submit it.

Any ideas?

Offline

#2 2013-02-03 17:12:59

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,095
Website

Re: CURL help: Submitting post form

separate your post parameters:

-d answer=whatever -d submit=Submit

Offline

#3 2013-02-03 22:23:30

Mindstormscreator
Member
Registered: 2012-07-01
Posts: 165

Re: CURL help: Submitting post form

falconindy wrote:

separate your post parameters:

-d answer=whatever -d submit=Submit

Sorry, this isn't working. The resultant web page appears to have the textarea filled out, but the form is not submitted. Huh.
Can someone take a look at the linked web page to see if my parameters are messed up or something?

Last edited by Mindstormscreator (2013-02-03 22:24:16)

Offline

#4 2013-02-04 01:13:59

Mindstormscreator
Member
Registered: 2012-07-01
Posts: 165

Re: CURL help: Submitting post form

OK, I've tried adding a bunch more parameters as sniffed out by the TamperData plugin for Firefox:

curl --cookie cjar -d "answer=test+data" -d "source=test+data" -d "crumb=kS2D%2FHqHgSS" -d \
"data=YTozOntzOjM6InFpZCI7czoyMToiMjAxMzAyMDMxNDUyMjBBQTYzRURvIjtzOjQ6InN0ZXAiO3M6NzoicHJldmlldyI7czo1OiJ0b2tlbiI7aToxMzU5OTM5ODEzO30%3D"\
 -d "submit-button=Submit" http://answers.yahoo.com/question/answer?qid=20130203145220AA63EDo

Still doesn't work. Hmm.

Offline

Board footer

Powered by FluxBB