Re: wget --post-data issue



On Sat, Jan 21, 2012 at 01:03:06PM +0000, Camaleón wrote:
On Sat, 21 Jan 2012 18:10:12 +0530, J. Bakshi wrote:

Dear list,

I have a form which have 2 input field "Roll number" and "comments" ;
using formfind command I get the following

```````````````````
--- FORM report. Uses POST to URL "index.php"
Input: NAME="go" VALUE="1" (HIDDEN)
Input: NAME="roll_no" VALUE="10" (TEXT)
Textarea: NAME="message"
Button: "Submit" (SUBMIT)
--- end of FORM
--- FORM report. Uses GET to URL "<form name=copy>"
Button: "Copy to clipboard" (BUTTON)
Textarea: NAME="txt"
--- end of FORM

````````````````````

The roll number always have 10 as default, and there is a text-area to
input comment. How can I use wget with --post-data option to send the
values ? And how can I use wget for [ Button: "Submit" ] ?

Based on the manual of wget, I would try:

wget --post-data 'go=1&roll_no=10&message=your_message_here' http://www.thesite.com/index.php


You could do the same with curl

curl -d "go=1&roll_no=10&message=your message here" http://site.url/file

For some reason, I favor curl for stuff like this.
I use it a lot, for posting to my WP install, tumblr, posterous,
statusnet, etc., etc. (scripts on site in my sig for all the above).

./tony
--
http://www.tonybaldwin.me
all tony, all the time!


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx
Archive: http://lists.debian.org/20120121165741.GA27374@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx



Relevant Pages

  • Re: Roll back a version
    ... Without having to wget the deb file etc. ... It is possible to roll back a ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: wget --post-data issue
    ... Button: "Copy to clipboard" ... The roll number always have 10 as default, and there is a text-area to ... How can I use wget with --post-data option to send the ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Roll back a version
    ... Without having to wget the deb file etc. ... It is possible to roll back a version for a particular software. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". ...
    (Debian-User)
  • Re: wget/curl cannot work on debian amd64
    ... I have a problem with using wget and curl on debian amd64 ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ... Trouble? ...
    (Debian-User)
  • Non-free repo on DVD!
    ... So i found this scrip on the web: ... wget: invalid option -- f ... Try `wget --help' for more options. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)