Home » Archimedes archive » Acorn User » AU 1997-Xmas B.adf » PD » NetPlex/!Netplex/!Help/HTML/cgi-bin/time

NetPlex/!Netplex/!Help/HTML/cgi-bin/time

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/time
Read OK:
File size: 034F bytes
Load address: 0000
Exec address: 0000
File contents
   10REM >cgi-bin.time  (Netplex Example)
   20REM =========================================================================
   30REM Displays the time.  Note that this example program does not use the CGI
   50REM Library as it is simple enough not to need it.
   70REM =========================================================================
   80
   90REM We need to have 'CHR$(13);CHR$(10);' at the end of every header line.
  100
  110PRINT "Content-Type: text/html";CHR$(13);CHR$(10);
  111PRINT                           CHR$(13);CHR$(10);
  130
  140REM This is now the HTML 'page', and as such we don't need to
  150REM be bothered about the line endings.
  160
  170PRINT "<HTML>";
  180PRINT "<HEAD><TITLE>The time sponsored by Netplex is...</TITLE></HEAD>";
  190PRINT "<BODY>";
  200PRINT "<H1>Time</H1>";
  210PRINT "<HR>";
  220PRINT "<CENTER><P><FONT SIZE=7>";TIME$;"</FONT></P></CENTER>";
  230PRINT "</BODY>";
  240PRINT "</HTML>";
  250
  260END

&� >cgi-bin.time  (Netplex Example)
O� =========================================================================
M� Displays the time.  Note that this example program does not use the CGI
24� Library as it is simple enough not to need it.
FO� =========================================================================
P
ZK� We need to have 'CHR$(13);CHR$(10);' at the end of every header line.
d
n,� "Content-Type: text/html";�(13);�(10);
o,�                           �(13);�(10);
�
�?� This is now the HTML 'page', and as such we don't need to
�)� be bothered about the line endings.
�
�� "<HTML>";
�H� "<HEAD><TITLE>The time sponsored by Netplex is...</TITLE></HEAD>";
�� "<BODY>";
�� "<H1>Time</H1>";
�
� "<HR>";
�;� "<CENTER><P><FONT SIZE=7>";�$;"</FONT></P></CENTER>";
�� "</BODY>";
�� "</HTML>";
�
�
�
00000000  0d 00 0a 26 f4 20 3e 63  67 69 2d 62 69 6e 2e 74  |...&. >cgi-bin.t|
00000010  69 6d 65 20 20 28 4e 65  74 70 6c 65 78 20 45 78  |ime  (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  4d f4 20 44 69 73 70 6c  |=====...M. Displ|
00000080  61 79 73 20 74 68 65 20  74 69 6d 65 2e 20 20 4e  |ays the time.  N|
00000090  6f 74 65 20 74 68 61 74  20 74 68 69 73 20 65 78  |ote that this ex|
000000a0  61 6d 70 6c 65 20 70 72  6f 67 72 61 6d 20 64 6f  |ample program do|
000000b0  65 73 20 6e 6f 74 20 75  73 65 20 74 68 65 20 43  |es not use the C|
000000c0  47 49 0d 00 32 34 f4 20  4c 69 62 72 61 72 79 20  |GI..24. Library |
000000d0  61 73 20 69 74 20 69 73  20 73 69 6d 70 6c 65 20  |as it is simple |
000000e0  65 6e 6f 75 67 68 20 6e  6f 74 20 74 6f 20 6e 65  |enough not to ne|
000000f0  65 64 20 69 74 2e 0d 00  46 4f f4 20 3d 3d 3d 3d  |ed it...FO. ====|
00000100  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  |================|
*
00000140  3d 3d 3d 3d 3d 0d 00 50  04 0d 00 5a 4b f4 20 57  |=====..P...ZK. W|
00000150  65 20 6e 65 65 64 20 74  6f 20 68 61 76 65 20 27  |e need to have '|
00000160  43 48 52 24 28 31 33 29  3b 43 48 52 24 28 31 30  |CHR$(13);CHR$(10|
00000170  29 3b 27 20 61 74 20 74  68 65 20 65 6e 64 20 6f  |);' at the end o|
00000180  66 20 65 76 65 72 79 20  68 65 61 64 65 72 20 6c  |f every header l|
00000190  69 6e 65 2e 0d 00 64 04  0d 00 6e 2c f1 20 22 43  |ine...d...n,. "C|
000001a0  6f 6e 74 65 6e 74 2d 54  79 70 65 3a 20 74 65 78  |ontent-Type: tex|
000001b0  74 2f 68 74 6d 6c 22 3b  bd 28 31 33 29 3b bd 28  |t/html";.(13);.(|
000001c0  31 30 29 3b 0d 00 6f 2c  f1 20 20 20 20 20 20 20  |10);..o,.       |
000001d0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000001e0  20 20 20 20 bd 28 31 33  29 3b bd 28 31 30 29 3b  |    .(13);.(10);|
000001f0  0d 00 82 04 0d 00 8c 3f  f4 20 54 68 69 73 20 69  |.......?. This i|
00000200  73 20 6e 6f 77 20 74 68  65 20 48 54 4d 4c 20 27  |s now the HTML '|
00000210  70 61 67 65 27 2c 20 61  6e 64 20 61 73 20 73 75  |page', and as su|
00000220  63 68 20 77 65 20 64 6f  6e 27 74 20 6e 65 65 64  |ch we don't need|
00000230  20 74 6f 0d 00 96 29 f4  20 62 65 20 62 6f 74 68  | to...). be both|
00000240  65 72 65 64 20 61 62 6f  75 74 20 74 68 65 20 6c  |ered about the l|
00000250  69 6e 65 20 65 6e 64 69  6e 67 73 2e 0d 00 a0 04  |ine endings.....|
00000260  0d 00 aa 0f f1 20 22 3c  48 54 4d 4c 3e 22 3b 0d  |..... "<HTML>";.|
00000270  00 b4 48 f1 20 22 3c 48  45 41 44 3e 3c 54 49 54  |..H. "<HEAD><TIT|
00000280  4c 45 3e 54 68 65 20 74  69 6d 65 20 73 70 6f 6e  |LE>The time spon|
00000290  73 6f 72 65 64 20 62 79  20 4e 65 74 70 6c 65 78  |sored by Netplex|
000002a0  20 69 73 2e 2e 2e 3c 2f  54 49 54 4c 45 3e 3c 2f  | is...</TITLE></|
000002b0  48 45 41 44 3e 22 3b 0d  00 be 0f f1 20 22 3c 42  |HEAD>";..... "<B|
000002c0  4f 44 59 3e 22 3b 0d 00  c8 16 f1 20 22 3c 48 31  |ODY>";..... "<H1|
000002d0  3e 54 69 6d 65 3c 2f 48  31 3e 22 3b 0d 00 d2 0d  |>Time</H1>";....|
000002e0  f1 20 22 3c 48 52 3e 22  3b 0d 00 dc 3b f1 20 22  |. "<HR>";...;. "|
000002f0  3c 43 45 4e 54 45 52 3e  3c 50 3e 3c 46 4f 4e 54  |<CENTER><P><FONT|
00000300  20 53 49 5a 45 3d 37 3e  22 3b 91 24 3b 22 3c 2f  | SIZE=7>";.$;"</|
00000310  46 4f 4e 54 3e 3c 2f 50  3e 3c 2f 43 45 4e 54 45  |FONT></P></CENTE|
00000320  52 3e 22 3b 0d 00 e6 10  f1 20 22 3c 2f 42 4f 44  |R>";..... "</BOD|
00000330  59 3e 22 3b 0d 00 f0 10  f1 20 22 3c 2f 48 54 4d  |Y>";..... "</HTM|
00000340  4c 3e 22 3b 0d 00 fa 04  0d 01 04 05 e0 0d ff     |L>";...........|
0000034f