Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

cgi and normal scripts

 [1/5] from: balayo::mindspring::com at: 26-Jul-2000 10:09


Hey list, I have a cgi question for you. If you want to use cgi with REBOL, do you have to start out with that intention, or can you cgi-ize a regular script? more specifically, I want to use the various fields of a form as input for a "normal" script. "input-cgi.r" seems perfect. can someone spare some tips? -- Turn your computer off. Go outside. -tom

 [2/5] from: rchristiansen:pop:isdfa:sei-it at: 26-Jul-2000 10:40


You could either append input-cgi.r with your "normal" script and run it all together -or- you could 'do other scripts from input-cgi.r

 [3/5] from: news:ted:husted at: 26-Jul-2000 14:10


A CGI script is a script that is run by the Web server, in response to a request from a Web page - either from a form or from a hyperlink. When the server runs the script, it sends a bunch of environment variables to the script via standard input. It also directs anything the scripts sends back via standard output to the browser (rather than the consol). This is the Common Gateway Interface, or CGI. A CGI-aware scripting language, like REBOL, can read the environment variables the Web server sets, and use them in the script. So to CGI-ize a script, you "just" need to write it so it takes input from the CGI variables, and writes to standard output the same way a server would send back a Web page. (For example, a simple header to identify the document type, and then straight HTML). It's otherwise a normal script, running as the user who started the HTTP service. -Ted. *********** REPLY SEPARATOR *********** On 7/26/2000 at 10:09 AM [balayo--mindspring--com] wrote: Hey list, I have a cgi question for you. If you want to use cgi with REBOL, do you have to start out with that intention, or can you cgi-ize a regular script? more specifically, I want to use the various fields of a form as input for a "normal" script. "input-cgi.r" seems perfect. can someone spare some tips? -- Turn your computer off. Go outside. -tom

 [4/5] from: news:ted:husted at: 26-Jul-2000 14:33


Ooops .. should have been When the server runs the script, it sets a bunch of environment variables, and can also send user variables to the script via standard input. *********** REPLY SEPARATOR *********** On 7/26/2000 at 2:10 PM [news--ted--husted--com] wrote: A CGI script is a script that is run by the Web server, in response to a request from a Web page - either from a form or from a hyperlink. When the server runs the script, it sends a bunch of environment variables to the script via standard input. It also directs anything the scripts sends back via standard output to the browser (rather than the consol). This is the Common Gateway Interface, or CGI. A CGI-aware scripting language, like REBOL, can read the environment variables the Web server sets, and use them in the script. So to CGI-ize a script, you "just" need to write it so it takes input from the CGI variables, and writes to standard output the same way a server would send back a Web page. (For example, a simple header to identify the document type, and then straight HTML). It's otherwise a normal script, running as the user who started the HTTP service. -Ted. *********** REPLY SEPARATOR *********** On 7/26/2000 at 10:09 AM [balayo--mindspring--com] wrote: Hey list, I have a cgi question for you. If you want to use cgi with REBOL, do you have to start out with that intention, or can you cgi-ize a regular script? more specifically, I want to use the various fields of a form as input for a "normal" script. "input-cgi.r" seems perfect. can someone spare some tips? -- Turn your computer off. Go outside. -tom

 [5/5] from: tim:johnsons-web at: 26-Jul-2000 10:57


If you send me input-cgi.r, I'll take a look at it and offer some suggestions if you like. I do a bit of CGI. -Tim At 10:09 AM 7/26/00 +0100, you wrote: