CGI Code – What Is It For?

code CGI script

The Common Gateway Interface, commonly known as CGI, is widely used standard for running scripts on a server. The CGI provides access to data and scripts on the web server, thus allowing the creation of dynamic web pages (most frequently HTML forms). The Common Gateway Interface enables the execution of scripts that run on the server in the user’s web browser. CGI scripts (or programs) are used for all kind of dynamic (not static) web pages that may include forms or other interactive features (counters, forums, ads) or simply need to update their information constantly. The CGI code helps the web server to understand that the page is not static and that there’s a script that it should run as a program in order to display the required data in the browser.

CGI-bin & CGI Scripts

CGI-bin and CGI file

CGI may serve various scripts that are installed on the server, so it’s very flexible and enables you to use different languages to enrich your website. Most CGI files are written in Perl, there are also CGI C or C++ scripts, CGI in Python, Tcl, Java, Visual Basic etc. In order for the web browser to display the data generated by the CGI code on the server, there are two crucial requirements to be met – the CGI script must be placed in the CGI-bin directory on your server and must have a .cgi file extension. That’s why you must make sure that your host provides you with access to the CGI-bin. It’s not even necessary to write any CGI code, there are many free CGI scripts that you can use for your site. For Unix you must make files executable via the “chmod” command. The CGI file should be always uploaded in ASCII mode as well.

Free Website Hosting with CGI

free website hosting CGI

Do you need free CGI script hosting to improve your website? Well, we offer you free website hosting with CGI, Perl and PHP5. With paid shared web hosting you can get also free CMSs, website builders, Python, Ruby, ASP.NET, SSI and more. Our shared plans start at $24.00£24.0024.00€ per year.

FREE Hosting Plan

$0.00£0.000.00€ per year

    1000 MB Disk Space
    5 GB Monthly Traffic
    1 Domain Hosting
    MySQL, SpamAssassin
    PHP5, Perl
    Advanced Control Panel
<< Go Back to Hosting Encyclopedia    
We use cookies to ensure you can get the best experience on our site. If you keep using this site we assume that you agree to our use of cookies. Privacy Policy OK