Web Hosting
Only $4 / Month !!!
(A lot of Space at a Very Low Price)

Back ] Up ] Next ]

CGI

What is it ?

Common Gateway Interface. These are usually quite small ( though not always ! ) programs that can be run from the browser.

Why should I use it ?

It will allow your visitor to ' interact ' with the website, it will also enable you to make pages that change. For example you may have noticed at the top of some of the pages on this site there is a silly little quote that changes each time you refresh the page, well that was done using a CGI script. Other uses of CGI script are to provide form to E-Mail, banner rotation, polls, chat rooms and numerous other functions.

How do I use it ?

This part is really for those with at least a small understanding of the principles of using CGI scripts. If you are new then you can find some good tutorials by following the ' resources ' listed in the table on the left. You will also find some very good scripts to use there, quite a lot of them are free. If you have any problems please do not hesitate to get in contact with me.
Each host has different requirements for running CGI scripts, usually they have to be placed in a cgi-bin, but with our hosting it does not matter where you place the scripts. Having said that we do recomend that you create one folder in your directory for all your CGI scripts as it will make it easy for you to keep track of them.
The information you need for installing scripts :

Perl 5 is installed and the path is :
#!/usr/bin/perl

The base path to your Web directory is :
/home/sites/www.yoursite.com/web

The path to sendmail program is :
/usr/sbin/sendmail

The extension for CGI script can be either .cgi or .pl as both will work.

Make sure you upload your CGI files in ASCII format, if you use binary the script could become corrupt.