[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Server Program?



Sender: Scott Klement <sk@xxxxxxxxxxxxxxxx>


Hi Jere,

> The other system will be using a
> HTTP://as400.ducks.org:XXXX/cgi_bin/program1.pgm?key=XXXXXXX
>
> what I need to happen is when program1 is started and processes the key that
> was passed to it through http I need to send data back to the program that
> issued the http call on the other system. How do I build program1 to do
> that?

If you're familiar with this type of programming, you should know that
when you want to send data back to the calling application, you write that
information to the program's "standard output"

In programs that are returning HTML output, you first tell the browser
to expect HTML, then you send the HTML itself, like this:

Content-type: text/html
-- empty line --
<html>
 <more html data>
</html>

You can return any other type of data the same way.  Send a HTTP header,
followed by a blank line, followed by the data that you want to return.
You can even make up your own content types, as long as you precede them
with an X.

For example:

Content-type: text/X-duck-data

<your data goes here>

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------