LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   shell script form submit (https://www.linuxquestions.org/questions/linux-general-1/shell-script-form-submit-60441/)

precioso77 05-18-2003 07:11 AM

shell script form submit
 
good day everyone..

i was wandering if anyone knows how to call a http form and / or submit values to it thru shell scripst

thanx a million

cheers

dorian33 05-18-2003 08:29 AM

There is no difference between submitting the form or 'usual' http site recall. I will give you some info but the rest is in your hand (you need to learn the http protocol)
Try open telnet session to a site (let's assume www.linuxquestions.org) port 80. Next type:
GET / HTTP/1.1<enter>
<enter>
You'll see a lot of response - it is what the browser gets from this site (address: www.linuxquestions.org)
If you try:
GET /questions HTTP/1.1<enter>
<enter>
it is equivalent of request for www.linuxquestions.org/question done in browser.
If you do:
GET /questions/newreply.php?s=&action=newreply HTTP/1.1<enter>
<enter>
is submitting the form with 's' and 'action' "variables" filled with values.

In this way you can do what you want. But you need know the http protocol and the socket handling from shell script level (learn perl or another shell script language which allows for it)

michaelk 05-18-2003 11:50 AM

Like dorian33 says using a cgi bash script is no different than with with any other language. You can search the web and find lots of example scripts.

http://bashlib.sourceforge.net/


All times are GMT -5. The time now is 07:10 AM.