
Common Gateway Interface (CGI)
The Common Gateway Interface (CGI) is a standard protocol used for web servers to communicate with external programs, allowing them to generate dynamic web content. When a user requests a web page, the server can run a CGI script—often written in languages like Perl or Python—to process that request, perform calculations, access databases, or handle user input. The script then sends the results back to the web server, which delivers them to the user's browser. CGI enables websites to be more interactive and responsive to user actions by generating content on-the-fly.