Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
10-31-2006, 12:23 PM
|
#1
|
|
Member
Registered: Oct 2004
Location: Norway
Distribution: Slackware, CentOS
Posts: 633
Rep:
|
shell script to submit web POST data?
All,
As a "quickfix" on a Linux system we have, there is a need to get a shell script to submit a form on a webpage. I assume netcat is the way to go, but do not know how to proceed to make the statement.
In short, we have an application interface problem where one application can run a shell-script with parameters, and the other one (at partner location, for the moment outside out control) uses a web form to receive input.
Now - the question is, this application should select radio-button one, push submit and that's it. Obviously I can very easily do this in Konqueror, but to write a shell-script that gets the http form-post/get problem correct is different.
Can anyone please help me out?
Thanks!
-Y1
|
|
|
|
10-31-2006, 02:57 PM
|
#2
|
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 42,827
|
curl and wget can both correctly post forms in a script. check google for examples of doing it, as it' snot something i've personally done, but i know it's more than doable.
|
|
|
|
11-01-2006, 02:09 PM
|
#3
|
|
Member
Registered: Oct 2004
Location: Norway
Distribution: Slackware, CentOS
Posts: 633
Original Poster
Rep:
|
Thanks. A bit more stubborn Googling found the program I was looking for - http://www.w3.org/ComLine/ - the program is w3c and it works like a charm
-Y1
|
|
|
|
11-01-2006, 03:40 PM
|
#4
|
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 42,827
|
that's just a cut down version of wget and curl... why not just use the non-obselete proof-of-concept tools already on your system? of course... whatever works is fine at the end of the day.
|
|
|
|
11-03-2006, 03:05 AM
|
#5
|
|
Member
Registered: Oct 2004
Location: Norway
Distribution: Slackware, CentOS
Posts: 633
Original Poster
Rep:
|
Thanks. You're right - curl seems to do just the same as w3c, but as you say - curl is standard and maintained, and w3c is not. Will experiment some more and try the curl-way.
Just out of curiousity - do I need wget at all for this? All I want to do is to submit a value to a web-page form, I don't need to get anything...
-Y1
Edit: fix typo
Last edited by Yalla-One; 11-03-2006 at 03:38 AM.
|
|
|
|
11-03-2006, 04:21 AM
|
#6
|
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 42,827
|
well essentially wget and curl are very very similar, and largely down to personal preference. i prefer wget, but know that curl is slightly more powerful in some areas.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 06:54 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|