Artikel #42

Can I run CGI scripts on my home page?

Yes, CGI is recognized by the web server, provided the file has a name of the form something.cgi, is executable (chmod +x filename), and lies under your public_html directory.

The programs can be written in arbitrary languages as long as they are executable by our web server (log onto www8.cs.umu.se using ssh and compile there if compilation is required.) Script languages such as shell script and perl are recommended because they are not dependent upon the type of machine.

The first program which should be written is the type of data which follows; for example,
Content-type: text/html
Next, an empty line should be written, to identify the end of the HTTP headers. (It is possible to insert several headers before the blank line, but in most cases this is not necessary.) Finally, the data which is to be shown to the client is given.

Related areas

UNIX , Programming , Homepage


Search for: