Common Gateway Interface (CGI)

Hostway Tech Team - May 14, 2009

A CGI is a specification that allows you to create dynamic Web page. It creates a standard for information traveling between a CGI program and a server.

A CGI program is a piece of code that is executed on the server and generates customized content. It can be written in almost any scripting language. The custom content is integrated into the Web page and returned to your browser. CGI serves a function similar to Microsoft’s Active Server Pages (ASP).


With CGI and CGI programs, you can:

  • Create a guestbook
  • Rotate advertisements
  • Display number of page visits
  • Display the time and date
  • Create surveys
  • Access databases and manipulate data
  • Create a visitor forum

Level of Difficulty

Using CGI is more difficult than creating simple HTML pages. However, CGI programs vary in difficulty depending on the complexity of the desired result and the language used to write the program.

The Hostway Difference