Sample SSI Programs

This section presents the complete C code for several useful SSI programs. Some of them are platform-independent; others use some special features in the Windows NT operating system.


The SSIDump program is a handy debugging utility that dumps the SSI environment variables and command-line arguments back to the browser (see Listing 29.1).

Code Listing 29.1. ssidump.c—SSI Program for Dumping SSI Environment Variables
 // SSIDUMP.C // This program dumps the SSI environment variables // to the screen. The code is platform-independent. // Compile it for your system and place it in your // CGI-BIN directory. #include <windows.h> // only required for Windows machines #include <stdio.h> void main(int argc, char * argv[]) { ...

Get Platinum Edition Using XHTML™, XML, and Java™ 2 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.