Home » Archimedes archive » Acorn User » AU 1997-Xmas B.adf » PD » NetPlex/!Netplex/!Help/HTML/cgi-bin/info
NetPlex/!Netplex/!Help/HTML/cgi-bin/info
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Archimedes archive » Acorn User » AU 1997-Xmas B.adf » PD |
Filename: | NetPlex/!Netplex/!Help/HTML/cgi-bin/info |
Read OK: | ✔ |
File size: | 07D7 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
10REM >cgi-bin.info (Netplex Example) 20REM ========================================================================= 30REM Prints information on the system variables used to interact with CGI 40REM programs. 50REM ========================================================================= 60 70LIBRARY "<Netplex$Dir>.CGILibrary" 80REM Set up error handler, redirection and library variables. 90PROCcgi_init 100 110PROCcgi_header("text/html",-1) 120 130PRINT "<HTML>"; 150PRINT "<HEAD><TITLE>Information</TITLE></HEAD>"; 170PRINT "<BODY>"; 180PRINT "<H1>Information</H1>"; 190PRINT "<HR>"; 200 210PRINT "<H2>Static CGI Variables</H2>"; 220PRINT "<EM>Variables which are constant for the duration of the server.</EM><BR>" 230PRINT FNcgivar("CGI$ServerSoftware"); 240PRINT FNcgivar("CGI$ServerName"); 250PRINT FNcgivar("CGI$GatewayInterface"); 260PRINT FNcgivar("CGI$ServerPort"); 270 280PRINT "<H2>Dynamic CGI Variables</H2>"; 290PRINT "<EM>Variables which change according to the request.</EM><BR>" 300PRINT FNcgivar("CGI$ServerProtocol"); 310PRINT FNcgivar("CGI$RequestMethod"); 320PRINT FNcgivar("CGI$PathInfo"); 330PRINT FNcgivar("CGI$PathTranslated"); 340PRINT FNcgivar("CGI$ScriptFilename"); 350PRINT FNcgivar("CGI$ScriptName"); 360PRINT FNcgivar("CGI$QueryString"); 370PRINT FNcgivar("CGI$RemoteHost"); 380PRINT FNcgivar("CGI$RemoteAddr"); 390PRINT FNcgivar("CGI$AuthType"); 400PRINT FNcgivar("CGI$AuthUser"); 410PRINT FNcgivar("CGI$ContentType"); 420PRINT FNcgivar("CGI$ContentLength"); 430 440PRINT "<H2>HTTP Header Fields</H2>"; 450PRINT "<EM>The header fields, as submitted by the client.</EM><BR>" 460cp%=0 470REPEAT 480 SYS "XOS_ReadVarVal","HTTP$*",misc%,256,cp%,0 TO ,,b%,cp% 490 IF b% THEN misc%?b%=13:PRINT "<CODE>";FNvar(cp%);"</CODE> ";$misc%;"<BR>"; 500UNTIL b%=0 510 540IF VAL(FNsystem_getvar("CGI$ContentLength")) > 0 THEN 541 PRINT "<H2>POST Data</H2>"; 542 PRINT "<EM>Data submitted by the client, as part of a POST operation.</EM><BR>" 550 REPEAT 560 PRINT CHR$(BGET#cgi_in%); 570 UNTIL EOF#cgi_in% 580ENDIF 590 600PRINT "</BODY>"; 610PRINT "</HTML>"; 620 630END 640 650DEF FNcgivar(v$) 660w$=FNsystem_getvar(v$) 670IF w$="" THEN ="" 680="<CODE>"+v$+"</CODE> "+w$+"<BR>"
&� >cgi-bin.info (Netplex Example) O� ========================================================================= J� Prints information on the system variables used to interact with CGI (� programs. 2O� ========================================================================= < F!ț "<Netplex$Dir>.CGILibrary" P>� Set up error handler, redirection and library variables. Z �cgi_init d n�cgi_header("text/html",-1) x �� "<HTML>"; �0� "<HEAD><TITLE>Information</TITLE></HEAD>"; �� "<BODY>"; �� "<H1>Information</H1>"; � � "<HR>"; � �&� "<H2>Static CGI Variables</H2>"; �Q� "<EM>Variables which are constant for the duration of the server.</EM><BR>" �$� �cgivar("CGI$ServerSoftware"); � � �cgivar("CGI$ServerName"); �&� �cgivar("CGI$GatewayInterface"); � �cgivar("CGI$ServerPort"); '� "<H2>Dynamic CGI Variables</H2>"; "E� "<EM>Variables which change according to the request.</EM><BR>" ,$� �cgivar("CGI$ServerProtocol"); 6#� �cgivar("CGI$RequestMethod"); @� �cgivar("CGI$PathInfo"); J$� �cgivar("CGI$PathTranslated"); T$� �cgivar("CGI$ScriptFilename"); ^ � �cgivar("CGI$ScriptName"); h!� �cgivar("CGI$QueryString"); r � �cgivar("CGI$RemoteHost"); | � �cgivar("CGI$RemoteAddr"); �� �cgivar("CGI$AuthType"); �� �cgivar("CGI$AuthUser"); �!� �cgivar("CGI$ContentType"); �#� �cgivar("CGI$ContentLength"); � �$� "<H2>HTTP Header Fields</H2>"; �C� "<EM>The header fields, as submitted by the client.</EM><BR>" � cp%=0 �� �= ș "XOS_ReadVarVal","HTTP$*",misc%,256,cp%,0 � ,,b%,cp% �R � b% � misc%?b%=13:� "<CODE>";�var(cp%);"</CODE> ";$misc%;"<BR>"; � � b%=0 � 2� �(�system_getvar("CGI$ContentLength")) > 0 � � "<H2>POST Data</H2>"; Q � "<EM>Data submitted by the client, as part of a POST operation.</EM><BR>" & � 0 � �(�#cgi_in%); : � �#cgi_in% D� N X� "</BODY>"; b� "</HTML>"; l v� � �� �cgivar(v$) �w$=�system_getvar(v$) �� w$="" � ="" �0="<CODE>"+v$+"</CODE> "+w$+"<BR>" �
00000000 0d 00 0a 26 f4 20 3e 63 67 69 2d 62 69 6e 2e 69 |...&. >cgi-bin.i| 00000010 6e 66 6f 20 20 28 4e 65 74 70 6c 65 78 20 45 78 |nfo (Netplex Ex| 00000020 61 6d 70 6c 65 29 0d 00 14 4f f4 20 3d 3d 3d 3d |ample)...O. ====| 00000030 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d |================| * 00000070 3d 3d 3d 3d 3d 0d 00 1e 4a f4 20 50 72 69 6e 74 |=====...J. Print| 00000080 73 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 6f 6e |s information on| 00000090 20 74 68 65 20 73 79 73 74 65 6d 20 76 61 72 69 | the system vari| 000000a0 61 62 6c 65 73 20 75 73 65 64 20 74 6f 20 69 6e |ables used to in| 000000b0 74 65 72 61 63 74 20 77 69 74 68 20 43 47 49 0d |teract with CGI.| 000000c0 00 28 0f f4 20 70 72 6f 67 72 61 6d 73 2e 0d 00 |.(.. programs...| 000000d0 32 4f f4 20 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d |2O. ============| 000000e0 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d |================| * 00000110 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 0d 00 3c |=============..<| 00000120 04 0d 00 46 21 c8 9b 20 22 3c 4e 65 74 70 6c 65 |...F!.. "<Netple| 00000130 78 24 44 69 72 3e 2e 43 47 49 4c 69 62 72 61 72 |x$Dir>.CGILibrar| 00000140 79 22 0d 00 50 3e f4 20 53 65 74 20 75 70 20 65 |y"..P>. Set up e| 00000150 72 72 6f 72 20 68 61 6e 64 6c 65 72 2c 20 72 65 |rror handler, re| 00000160 64 69 72 65 63 74 69 6f 6e 20 61 6e 64 20 6c 69 |direction and li| 00000170 62 72 61 72 79 20 76 61 72 69 61 62 6c 65 73 2e |brary variables.| 00000180 0d 00 5a 0d f2 63 67 69 5f 69 6e 69 74 0d 00 64 |..Z..cgi_init..d| 00000190 04 0d 00 6e 1f f2 63 67 69 5f 68 65 61 64 65 72 |...n..cgi_header| 000001a0 28 22 74 65 78 74 2f 68 74 6d 6c 22 2c 2d 31 29 |("text/html",-1)| 000001b0 0d 00 78 04 0d 00 82 0f f1 20 22 3c 48 54 4d 4c |..x...... "<HTML| 000001c0 3e 22 3b 0d 00 96 30 f1 20 22 3c 48 45 41 44 3e |>";...0. "<HEAD>| 000001d0 3c 54 49 54 4c 45 3e 49 6e 66 6f 72 6d 61 74 69 |<TITLE>Informati| 000001e0 6f 6e 3c 2f 54 49 54 4c 45 3e 3c 2f 48 45 41 44 |on</TITLE></HEAD| 000001f0 3e 22 3b 0d 00 aa 0f f1 20 22 3c 42 4f 44 59 3e |>";..... "<BODY>| 00000200 22 3b 0d 00 b4 1d f1 20 22 3c 48 31 3e 49 6e 66 |";..... "<H1>Inf| 00000210 6f 72 6d 61 74 69 6f 6e 3c 2f 48 31 3e 22 3b 0d |ormation</H1>";.| 00000220 00 be 0d f1 20 22 3c 48 52 3e 22 3b 0d 00 c8 04 |.... "<HR>";....| 00000230 0d 00 d2 26 f1 20 22 3c 48 32 3e 53 74 61 74 69 |...&. "<H2>Stati| 00000240 63 20 43 47 49 20 56 61 72 69 61 62 6c 65 73 3c |c CGI Variables<| 00000250 2f 48 32 3e 22 3b 0d 00 dc 51 f1 20 22 3c 45 4d |/H2>";...Q. "<EM| 00000260 3e 56 61 72 69 61 62 6c 65 73 20 77 68 69 63 68 |>Variables which| 00000270 20 61 72 65 20 63 6f 6e 73 74 61 6e 74 20 66 6f | are constant fo| 00000280 72 20 74 68 65 20 64 75 72 61 74 69 6f 6e 20 6f |r the duration o| 00000290 66 20 74 68 65 20 73 65 72 76 65 72 2e 3c 2f 45 |f the server.</E| 000002a0 4d 3e 3c 42 52 3e 22 0d 00 e6 24 f1 20 a4 63 67 |M><BR>"...$. .cg| 000002b0 69 76 61 72 28 22 43 47 49 24 53 65 72 76 65 72 |ivar("CGI$Server| 000002c0 53 6f 66 74 77 61 72 65 22 29 3b 0d 00 f0 20 f1 |Software");... .| 000002d0 20 a4 63 67 69 76 61 72 28 22 43 47 49 24 53 65 | .cgivar("CGI$Se| 000002e0 72 76 65 72 4e 61 6d 65 22 29 3b 0d 00 fa 26 f1 |rverName");...&.| 000002f0 20 a4 63 67 69 76 61 72 28 22 43 47 49 24 47 61 | .cgivar("CGI$Ga| 00000300 74 65 77 61 79 49 6e 74 65 72 66 61 63 65 22 29 |tewayInterface")| 00000310 3b 0d 01 04 20 f1 20 a4 63 67 69 76 61 72 28 22 |;... . .cgivar("| 00000320 43 47 49 24 53 65 72 76 65 72 50 6f 72 74 22 29 |CGI$ServerPort")| 00000330 3b 0d 01 0e 04 0d 01 18 27 f1 20 22 3c 48 32 3e |;.......'. "<H2>| 00000340 44 79 6e 61 6d 69 63 20 43 47 49 20 56 61 72 69 |Dynamic CGI Vari| 00000350 61 62 6c 65 73 3c 2f 48 32 3e 22 3b 0d 01 22 45 |ables</H2>";.."E| 00000360 f1 20 22 3c 45 4d 3e 56 61 72 69 61 62 6c 65 73 |. "<EM>Variables| 00000370 20 77 68 69 63 68 20 63 68 61 6e 67 65 20 61 63 | which change ac| 00000380 63 6f 72 64 69 6e 67 20 74 6f 20 74 68 65 20 72 |cording to the r| 00000390 65 71 75 65 73 74 2e 3c 2f 45 4d 3e 3c 42 52 3e |equest.</EM><BR>| 000003a0 22 0d 01 2c 24 f1 20 a4 63 67 69 76 61 72 28 22 |"..,$. .cgivar("| 000003b0 43 47 49 24 53 65 72 76 65 72 50 72 6f 74 6f 63 |CGI$ServerProtoc| 000003c0 6f 6c 22 29 3b 0d 01 36 23 f1 20 a4 63 67 69 76 |ol");..6#. .cgiv| 000003d0 61 72 28 22 43 47 49 24 52 65 71 75 65 73 74 4d |ar("CGI$RequestM| 000003e0 65 74 68 6f 64 22 29 3b 0d 01 40 1e f1 20 a4 63 |ethod");..@.. .c| 000003f0 67 69 76 61 72 28 22 43 47 49 24 50 61 74 68 49 |givar("CGI$PathI| 00000400 6e 66 6f 22 29 3b 0d 01 4a 24 f1 20 a4 63 67 69 |nfo");..J$. .cgi| 00000410 76 61 72 28 22 43 47 49 24 50 61 74 68 54 72 61 |var("CGI$PathTra| 00000420 6e 73 6c 61 74 65 64 22 29 3b 0d 01 54 24 f1 20 |nslated");..T$. | 00000430 a4 63 67 69 76 61 72 28 22 43 47 49 24 53 63 72 |.cgivar("CGI$Scr| 00000440 69 70 74 46 69 6c 65 6e 61 6d 65 22 29 3b 0d 01 |iptFilename");..| 00000450 5e 20 f1 20 a4 63 67 69 76 61 72 28 22 43 47 49 |^ . .cgivar("CGI| 00000460 24 53 63 72 69 70 74 4e 61 6d 65 22 29 3b 0d 01 |$ScriptName");..| 00000470 68 21 f1 20 a4 63 67 69 76 61 72 28 22 43 47 49 |h!. .cgivar("CGI| 00000480 24 51 75 65 72 79 53 74 72 69 6e 67 22 29 3b 0d |$QueryString");.| 00000490 01 72 20 f1 20 a4 63 67 69 76 61 72 28 22 43 47 |.r . .cgivar("CG| 000004a0 49 24 52 65 6d 6f 74 65 48 6f 73 74 22 29 3b 0d |I$RemoteHost");.| 000004b0 01 7c 20 f1 20 a4 63 67 69 76 61 72 28 22 43 47 |.| . .cgivar("CG| 000004c0 49 24 52 65 6d 6f 74 65 41 64 64 72 22 29 3b 0d |I$RemoteAddr");.| 000004d0 01 86 1e f1 20 a4 63 67 69 76 61 72 28 22 43 47 |.... .cgivar("CG| 000004e0 49 24 41 75 74 68 54 79 70 65 22 29 3b 0d 01 90 |I$AuthType");...| 000004f0 1e f1 20 a4 63 67 69 76 61 72 28 22 43 47 49 24 |.. .cgivar("CGI$| 00000500 41 75 74 68 55 73 65 72 22 29 3b 0d 01 9a 21 f1 |AuthUser");...!.| 00000510 20 a4 63 67 69 76 61 72 28 22 43 47 49 24 43 6f | .cgivar("CGI$Co| 00000520 6e 74 65 6e 74 54 79 70 65 22 29 3b 0d 01 a4 23 |ntentType");...#| 00000530 f1 20 a4 63 67 69 76 61 72 28 22 43 47 49 24 43 |. .cgivar("CGI$C| 00000540 6f 6e 74 65 6e 74 4c 65 6e 67 74 68 22 29 3b 0d |ontentLength");.| 00000550 01 ae 04 0d 01 b8 24 f1 20 22 3c 48 32 3e 48 54 |......$. "<H2>HT| 00000560 54 50 20 48 65 61 64 65 72 20 46 69 65 6c 64 73 |TP Header Fields| 00000570 3c 2f 48 32 3e 22 3b 0d 01 c2 43 f1 20 22 3c 45 |</H2>";...C. "<E| 00000580 4d 3e 54 68 65 20 68 65 61 64 65 72 20 66 69 65 |M>The header fie| 00000590 6c 64 73 2c 20 61 73 20 73 75 62 6d 69 74 74 65 |lds, as submitte| 000005a0 64 20 62 79 20 74 68 65 20 63 6c 69 65 6e 74 2e |d by the client.| 000005b0 3c 2f 45 4d 3e 3c 42 52 3e 22 0d 01 cc 09 63 70 |</EM><BR>"....cp| 000005c0 25 3d 30 0d 01 d6 05 f5 0d 01 e0 3d 20 20 c8 99 |%=0........= ..| 000005d0 20 22 58 4f 53 5f 52 65 61 64 56 61 72 56 61 6c | "XOS_ReadVarVal| 000005e0 22 2c 22 48 54 54 50 24 2a 22 2c 6d 69 73 63 25 |","HTTP$*",misc%| 000005f0 2c 32 35 36 2c 63 70 25 2c 30 20 b8 20 2c 2c 62 |,256,cp%,0 . ,,b| 00000600 25 2c 63 70 25 0d 01 ea 52 20 20 e7 20 62 25 20 |%,cp%...R . b% | 00000610 8c 20 6d 69 73 63 25 3f 62 25 3d 31 33 3a f1 20 |. misc%?b%=13:. | 00000620 22 3c 43 4f 44 45 3e 22 3b a4 76 61 72 28 63 70 |"<CODE>";.var(cp| 00000630 25 29 3b 22 3c 2f 43 4f 44 45 3e 26 6e 62 73 70 |%);"</CODE> | 00000640 3b 26 6e 62 73 70 3b 22 3b 24 6d 69 73 63 25 3b |; ";$misc%;| 00000650 22 3c 42 52 3e 22 3b 0d 01 f4 0a fd 20 62 25 3d |"<BR>";..... b%=| 00000660 30 0d 01 fe 04 0d 02 1c 32 e7 20 bb 28 a4 73 79 |0.......2. .(.sy| 00000670 73 74 65 6d 5f 67 65 74 76 61 72 28 22 43 47 49 |stem_getvar("CGI| 00000680 24 43 6f 6e 74 65 6e 74 4c 65 6e 67 74 68 22 29 |$ContentLength")| 00000690 29 20 3e 20 30 20 8c 0d 02 1d 1d 20 20 f1 20 22 |) > 0 ..... . "| 000006a0 3c 48 32 3e 50 4f 53 54 20 44 61 74 61 3c 2f 48 |<H2>POST Data</H| 000006b0 32 3e 22 3b 0d 02 1e 51 20 20 f1 20 22 3c 45 4d |2>";...Q . "<EM| 000006c0 3e 44 61 74 61 20 73 75 62 6d 69 74 74 65 64 20 |>Data submitted | 000006d0 62 79 20 74 68 65 20 63 6c 69 65 6e 74 2c 20 61 |by the client, a| 000006e0 73 20 70 61 72 74 20 6f 66 20 61 20 50 4f 53 54 |s part of a POST| 000006f0 20 6f 70 65 72 61 74 69 6f 6e 2e 3c 2f 45 4d 3e | operation.</EM>| 00000700 3c 42 52 3e 22 0d 02 26 07 20 20 f5 0d 02 30 17 |<BR>"..&. ...0.| 00000710 20 20 20 20 f1 20 bd 28 9a 23 63 67 69 5f 69 6e | . .(.#cgi_in| 00000720 25 29 3b 0d 02 3a 11 20 20 fd 20 c5 23 63 67 69 |%);..:. . .#cgi| 00000730 5f 69 6e 25 0d 02 44 05 cd 0d 02 4e 04 0d 02 58 |_in%..D....N...X| 00000740 10 f1 20 22 3c 2f 42 4f 44 59 3e 22 3b 0d 02 62 |.. "</BODY>";..b| 00000750 10 f1 20 22 3c 2f 48 54 4d 4c 3e 22 3b 0d 02 6c |.. "</HTML>";..l| 00000760 04 0d 02 76 05 e0 0d 02 80 04 0d 02 8a 11 dd 20 |...v........... | 00000770 a4 63 67 69 76 61 72 28 76 24 29 0d 02 94 19 77 |.cgivar(v$)....w| 00000780 24 3d a4 73 79 73 74 65 6d 5f 67 65 74 76 61 72 |$=.system_getvar| 00000790 28 76 24 29 0d 02 9e 11 e7 20 77 24 3d 22 22 20 |(v$)..... w$="" | 000007a0 8c 20 3d 22 22 0d 02 a8 30 3d 22 3c 43 4f 44 45 |. =""...0="<CODE| 000007b0 3e 22 2b 76 24 2b 22 3c 2f 43 4f 44 45 3e 26 6e |>"+v$+"</CODE>&n| 000007c0 62 73 70 3b 26 6e 62 73 70 3b 22 2b 77 24 2b 22 |bsp; "+w$+"| 000007d0 3c 42 52 3e 22 0d ff |<BR>"..| 000007d7