How CGI Works
There are CGI programs that are written in a programming language and compiled and CGI scripts written in a scripting language, such as PERL. In either case, the CGI program or script will allow a server will respond to requests in two ways: with documents and with references to other documents. A CGI program or script can return a large number of different document types, including plain text, images, audio files, and HTML documents. CGI programs and scripts operate in real time and they are executed by the Web server, rather than displayed to the browser that the user has chosen. CGI scripts and programs reside in a directory that is called /CGI-bin.
Finding CGI Web Hosting
A variety of programming and scripting languages can be used in CGI programs and scripts, but they have to be compatible with the system by which they will be used in order for the programs and scripts to work. This fact leads to the two biggest questions you need to answer when you seek to host for your CGI-based website:
- Does the web host offer CGI-BIN as part of the package you’re interested in?
- Is the language you used or wish to use supported?
The first question will have a yes or no answer, and if the answer is “no,” you may wish to either find a more robust package or a different web host.
The second question will also have a yes or no answer, but if the answer is “no,” you may simply need to switch to another server type (Linux, UNIX, Windows) in order to find that the language you programmed or scripted with is covered. On the other hand, you may also need to look at an upgraded program offered by the same CGI web host. Keep in mind to check the versions of the language that are supported, or you may be in for some surprised when you try to run your programs or scripts.