Python - CGI Programming
The CommonGateway Interface (CGI) is a set of standards that define how information is
exchanged between a web server and a custom script. CGI specifications are
currently managed by NCSA.
SkyInfotech is the best center for Python training
for the last 17 years and provides the best knowledge of Python by industry
experts.
What is CGI?
·
The
Common Gateway Interface (CGI) is a standard for external gateway programs to
interact with information servers such as HTTP servers.
·
The
current version is CGI / 1.1 and CGI / 1.2 is under development.
Surf the Internet
To understand
the concept of CGI, let's look at what happens when we click a hyperlink to
search a specific website or URL.
·
Your
browser interacts with the HTTP web server and asks for the URL, i.e. H. The
file name.
·
The
web server highlights the URL and searches the file name. Otherwise, if it is
determined that the file is being restored in the browser, an error message
will be sent indicating that you requested an incorrect file.
·
The
web browser retrieves the response from the webserver and displays the received
file or error message.
However, it is
possible to set up the HTTP server so that the file cannot be restored every
time a file is requested in a specific directory. Instead, it runs as a program
and each output program is returned for display in your browser. This
functionality is called the Common Gateway Interface, or CGI, and the programs
are called CGI scripts. These CGI programs can be a Python script, a PERL script,
a shell script, a C or C ++ program, etc.
Use of Cookies In CGI
HTTP protein is
a trivial protocol. For a commercial website, it is necessary to manage session
information on different pages. For example, user registration ends after many
pages have been completed. How is user-session information stored on all
websites?
In many cases,
the use of cookies is the best way to store and track settings, purchases,
commissions, and other information required for a better visitor experience or
site statistics.
Comments
Post a Comment