home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Spezial
/
SPEZIAL2_97.zip
/
SPEZIAL2_97.iso
/
ANWEND
/
ONLINE
/
OS2WWW42
/
SYS402.R4
/
CGI-BIN
/
SHOWCGI2.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1996-12-21
|
2KB
|
38 lines
/***************************************************************************
* Demonstrates the use of Web Macros within the CGI interface using a REXX program.
**************************************************************************/
env = "OS2ENVIRONMENT"
Say "Content-type: text/x-server-parsed-html"
Say
say "<body bgcolor=#F0F0F0>"
Say "<!--#include virtual=/powerweb/title.inc -->"
Say "<!--#call macro='title(''CGI/1.1 using Web Macros Demonstration:'')' -->"
Say "<table border=1 cellspacing=0 cellpadding=0>"
/* Echo the Standard Set of CGI Variables */
Say "<tr><td><font size=-1 face=helv>Remote Host<td><font size=-1 face=helv><!--#echo var=Connection:/RemoteHost -->"
Say "<tr><td><font size=-1 face=helv>Remote IP Address<td><font size=-1 face=helv><!--#echo var=Connection:/RemoteAddress -->"
Say "<tr><td><font size=-1 face=helv>Remote User Name<td><font size=-1 face=helv><!--#echo var=Request:/AuthenticateUser -->"
Say "<tr><td><font size=-1 face=helv>Request Protocol<td><font size=-1 face=helv><!--#echo var=Request:/Protocol -->"
Say "<tr><td><font size=-1 face=helv>Request Method<td><font size=-1 face=helv><!--#echo var=Request:/Method -->"
Say "<tr><td><font size=-1 face=helv>Request<td><font size=-1 face=helv><!--#echo var=Request:/Request -->"
len = value("CONTENT_LENGTH",,env)
Say "<tr><td><font size=-1 face=helv>CONTENT_LENGTH<td><font size=-1 face=helv>" || len
/* If POST method was used to pass parameters, get them and echo them */
method = value("REQUEST_METHOD",,env)
If (method == "POST") & (len \= "") Then Do
post_string = LineIn()
Say "<tr><td><font size=-1 face=helv>CGI Script Parameters<td><font size=-1 face=helv>" || post_string
End
Say "</table>"