Cgi dating base program

A generally more reliable method of passing information to a CGI program is the POST method.This packages the information in exactly the same way as GET methods, but instead of sending it as a text string after a ? This message comes into the CGI script in the form of the standard input.Before running your CGI program make sure you have change mode of file using chmod 755 UNIX command to make file executable.The above C program is a simple program which is writing its output on STDOUT file i.e. There is one important and extra feature available which is first line printing Content-type:text/html\r\n\r\n.By convention CGI files will have extension as .cgi, though they are C executable.By default, Apache Web Server is configured to run CGI programs in /var/www/cgi-bin.These CGI programs can be a written in Python, PERL, Shell, C or C etc.

Now you must have understood the basic concept of CGI and you can write many complicated CGI programs using Python.

There is a CGI library written for C program which you can download from ftp://org/gnu/cgicc/ and follow the steps to install the library − You can check related documentation available at ‘C CGI Lib Documentation.

You must have come across many situations when you need to pass some information from your browser to web server and ultimately to your CGI Program.

Your server sends some data to the visitor's browser in the form of a cookie. If it does, it is stored as a plain text record on the visitor's hard drive.

Now, when the visitor arrives at another page on your site, the cookie is available for retrieval.