Solved

CCI + Application software

Posted on 1997-05-16
8
177 Views
Last Modified: 2013-12-25
I have a fortran Application which I would like people using the web
to be able to submit data and send it to the Program which uses the
input and then sends the output from the program back to the web.
Similar to unix shell would be
program <input >output      where input is from a form and output goes back to the web.
HOW? What script do I use to set up the interface? Is there a script already in use that can be used?
0
Comment
Question by:ceemgs1
8 Comments
 
LVL 5

Expert Comment

by:julio011597
Comment Utility
And your problem is?
-julio
0
 

Expert Comment

by:idstech
Comment Utility
Is this jeopardy? :)
0
 
LVL 2

Expert Comment

by:n3mtr
Comment Utility
The web server does all this for you if you have your program setup as a cgi program.  It will send the data from the web form on the standard input and you send out the html data on the output.  You need to be able to read the data from the web server, its in a special format.  As for output you can output HTML or text or a picture.
0
 

Author Comment

by:ceemgs1
Comment Utility
Edited text of question
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 

Author Comment

by:ceemgs1
Comment Utility
Edited text of question
0
 

Author Comment

by:ceemgs1
Comment Utility
I have a Frotran program which requires to be put on the web.
I have no access to the source of this program. I would like to
know if there is script available that will handle the form input
and send it to the Fortran program and inturn send the results
back to the web?
I hope this helps more.
0
 
LVL 5

Expert Comment

by:julio011597
Comment Utility
It is strongly dependent on which input/output format your Fortran program needs/generates.

Technically, it's just a matter of building a CGI program which:

- gets infos from a form;
- reformats infos as needed by the Fortran prog;
- opens a pipe to that prog;
- writes infos to the pipe, reads back the answer;
- formats answer for web publishing;
- writes answer to the web (to stdout).

For further help, you should show (a sample of):

- what comes from the form;
- what the Fortran prog waits for;
- what the F. prog answers back;

- OS you are on, and programming language you'd like to use.

BTW, this seems less a request for advice than a request for a ready program.

Rgds, julio
0
 
LVL 5

Accepted Solution

by:
icd earned 200 total points
Comment Utility
To give you a 'bare bones' program that you can adapt to your circumstances.

This assumes that the fortran program takes two command line arguments which you have provided from a form as 'par1' and 'par2'. The output of your fortran program is output in a <PRE> tag in an HTML document.

--- cut here ---
#!/usr/local/bin/perl
require "cgi-bin.pl";
&ReadParse;

@output = `yrFortran $in{'par1'} $in{'par2'}`;

print <<__END__;
Content-type: text/html

<html>
<head></head>
<body>
  <pre>
  @output
  </pre>
</body>
</html>
__END__
1;
--- end ---




0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

There is an easy way, in .NET, to centralize the treatment of all unexpected errors. First of all, instead of launching the application directly in a Form, you need first to write a Sub called Main, in a module. Then, set the Startup Object to th…
How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now