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
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>
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>
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>
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)
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.
|All times are GMT -5. The time now is 02:56 PM.|