Server Self-Test & Demonstration
WebSite's Two CGI Interfaces:
Windows CGI Interface
The server supports a variant of CGI that is well suited to the Windows
environment. In addition, the server comes with a
framework module for VB that allows you to develop sophisticated CGI programs quickly. Since
VB can access a wide variety of information sources such as Access and
SQL Server databases, your flexibility is almost unlimited.
The sample is a test program that produces various reports from the
server about the CGI environment. The reports are in HTML
format. The sources to this test program (and all of the other
samples) are in the /cgi-src directory with a usage page in the
server document root. The usage page is returned if no test selector
is specified (as extra path info).
The URL to get the usage page is (VB5 runtime required)
Try it now. Don't worry if you don't understand everything you see. Just
understand that when you use this link, you are executing a compiled
Visual Basic program. For more information, see the
Windows CGI documentation - Chapters 8, 9, and 10 in
Creating Dynamic Content.
Standard CGI Interface
Web pioneers have developed many CGI applications using Unix shell
scripts, C, C++, and the
perl language. Windows NT has a POSIX
subsystem that can be used from WebSite Pro to execute Unix applications
as CGI programs. The Windows NT Resource Kit contains a basic set of Unix
command utilities, including a Korn Shell clone.
WebSite Professional comes with the complete
Perl for Win32 package. It can be used via the
Standard CGI interface using file associations if your perl script's
file name ends in .pl (.plx is used for
API-based perl execution).
If you've already installed Perl 5 for Win32 from the
WebSite Professional 2.0 CDROM, run this
small perl script
which sends back the names and values of some CGI environment variables.
The Standard CGI interface provided by the server on NT is virtually
identical to that provided by Unix-based servers. Therefore, you can use
existing CGI applications written in shell and perl, as long as you have
the other utilities needed by those scripts. You can also use 32-bit
Windows and console applications and/or associated documents as long as
the application is written for the standard CGI/1.1 interface.