Great example. Gunna play with this one meself.

Obligatory warning phrased anew.

"Listen traveller, there be a demon lurking near. If ye, place this script
upon an open server, you will let lose the beast upon your system! Your
defense, if this occurs, be to sift the intruders with the special name of
Parse. Only then will you sleep again at night!"

Brett.

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 19, 2000 8:57 AM
Subject: [REBOL] Re: console via GGI


Hello [EMAIL PROTECTED],

Comments below...

On 18-Jul-00, [EMAIL PROTECTED] wrote:

> Would it be possible to use the REBOL console via CGI? As follows:
>
>
> 1. Enter commands in to a text area within a Web form. The text area is
> given the name "rebol_input"
>
> <TEXTAREA NAME="rebol_input" ROWS="10" COLS="80"></TEXTAREA>
>
>
> 2. Hit <ENTER> and the contents of the query_string, containing a single
> string value for a single word called "rebol_input", is sent to a script.
>
>
> 3. The script decodes the CGI and creates the value 'cgi-input/rebol_input
> containing the input string for the console
>
>     cgi-input: make object! decode-cgi system/options/cgi/query-string
>
> 4. The script executes 'cgi-input/rebol_input sending the command to the
> console.
>
>     do cgi-input/rebol_input
>
> 5. Now here is where I'm stuck. How can I grab the result from the binary
so
> that I can print it to the browser?

I'm not sure what you mean by "the binary", however if you mean the rebol
binary, try the attached script.

It's not quite what you asked for, but you might get some ideas.

BTW.
The script was tested on Apache 1.3.12 (Amiga) and IE (Win98), please let me
know if it works. You probably want to change the first line of the script
to match your REBOL location and name...

Best regards
Thomas Jensen


Reply via email to