' CGIShell demo program ' Designed for CGIShell version 1.0.b.950930 ' This file last updated 11/28/95 ' DIM InputFile$, OutputFile$ ' ----- Get the input and output filenames x = INSTR(COMMAND$, ",") IF x = 0 THEN PRINT "This program is designed to be invoked by CGIShell." END ELSE InputFile$ = LEFT$(COMMAND$, x - 1) OutputFile$ = MID$(COMMAND$, x + 1) END IF ' ----- open both files hIn = 1 OPEN InputFile$ FOR INPUT AS #hIn hOut = 2 OPEN OutputFile$ FOR OUTPUT AS #hOut ' ----- Print the header and blank line PRINT #hOut, "Content-type: text/html" PRINT #hOut, "" ' ----- Print a nice-looking and <header> PRINT #hOut, "<html>" PRINT #hOut, "<title>CGIShell QuickBasic Demo" PRINT #hOut, "

CGIShell QuickBasic Demo

" PRINT #hOut, "

CGI Environment Variables

" ' ----- Print the environment variables PRINT #hOut, "COMMAND$="; COMMAND$ PRINT #hOut, "" ' ----- Close the output file, kill the input file, end CLOSE #hOut CLOSE #hIn KILL InputFile$ END