Saturday, January 18, 2014

How CGI Scripting Works

world wide web Servers
As recounted in the article How world wide web Servers Work, world wide web servers can be attractive easy. At their most basic, Web servers easily retrieve a document off the computer computer disk and drive it down the cable to the demanding browser. Let's say you kind in the URL http://www.bygpub.com/books/tg2rw/author.htm. The server gets a demand for the file /books/tg2rw/author.htm. If you gaze at the following figure, you can glimpse how the server resolves that demand:
throughout setup, the world wide web server has been instructed to understand that c:\My Documents\www is the server's origin book or directions. It then examines for /books/tg2rw/author.htm off of that origin. When you inquire for the URL http://www.bygpub.com/books/tg2rw/, the server understands that you are looking for the default file for that book or directions. It examines for some different files titles to try to find the default document: index.html, index.htm, default.html, default.htm. counting on the server, it may gaze for other ones as well. So the server turns http://www.bygpub.com/books/tg2rw/ into http://www.bygpub.com/books/tg2rw/index.htm and consigns that file. All other files should be particular by calling the files specifically.
This is how all world wide web servers handle static documents. Most world wide web servers furthermore handle dynamic documents -- through a means called the Common Gateway Interface, or CGI. You have glimpsed CGI in all kinds of locations on the world wide web, whereas you may not have known it at the time. For demonstration:
Any visitor publication permits you to go in a message in an HTML pattern and then, the next time the guest book is examined, the sheet will comprise your new application.
The WHOIS form at Network answers permits you to enter a domain title on a pattern, and the page returned is different counting on the domain title entered.
Any search motor permits you enter keywords on an HTML pattern, and then it dynamically conceives a sheet founded on the keywords you go in.
All of these dynamic sheets use CG

No comments:

Post a Comment