Common Gateway Interface – CGI
CGI is a standard for the construction of completely dynamic HTML documents by use of an external script (small program) installed on the same machine as the Web server. Common CGI scripts require a local interpreter or compiler. PERL and Python are popularly used to process HTML forms, and can verify user inputs as well as control the return of messages and perform further processing of the forms data. On a secure Web site, CGI can still be used for some e-commerce transactions, such as ordering some perfume for your mother's birthday. The forms data is concatenated into a string of delimited name/value pairs as the following example reveals:
name=Evan+Burke&card=Visa&number=8443261344895544&order=French+perfume
Note how each variable (name, card, number and order) is delimited by an &, and the each value by a + sign.
For notes on How to setup CGI on athene (PythonCGI), go to:
http://ispg.csu.edu.au/subjects/itc594/resources/apachecgi
Common Gateway Interface Demonstrations
1. Flat-file system
A Python CGI script that runs the flat-file system at http://athene.csu.edu.au/~keustace/friends.html
Enter some dummy test data and see the flat file grow.
2. Environment variables: ZOPE and Apache web servers
The environment variable display exercise begins at ZOPE using a local Python script and end with a look at Cookies and the same environment variables display at the Apache Web server on athene. Go to : http://ispg.csu.edu.au/subjects/itc594/resources/zopecgi/envform to begin.
Reference:
Charles Sturt University ITC 594 E-system infrastructure development student study guide
Tuesday, April 13, 2010
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment