Download CGI programming on the World Wide Web by Shishir Gundavaram PDF

By Shishir Gundavaram

The realm vast internet is greater than a spot to place up shrewdpermanent files and lovely images. utilizing the typical Gateway Interface (CGI), you could supply interactive queries and serve quick details from databases, labored up into colourful pix. This ebook deals a accomplished clarification of CGI and similar strategies for those who carry directly to the dream of offering their very own details servers on the net. the writer starts off before everything, explaining the price of CGI and the way it really works, then strikes quickly into the delicate information of programming. nearly all of examples use the commonest platform (UNIX) and the preferred language (Perl) used for CGI programming at the present time. although, the booklet additionally introduces the necessities of making CGI paintings with different systems and languages.

Show description

Read Online or Download CGI programming on the World Wide Web PDF

Best data in the enterprise books

Using MPI-2: Advanced Features of the Message Passing Interface

The Message Passing Interface (MPI) specification is accepted for fixing major clinical and engineering difficulties on parallel pcs. There exist greater than a dozen implementations on computing device structures starting from IBM SP-2 supercomputers to clusters of computers operating home windows NT or Linux ("Beowulf" machines).

The ABCs of TCP IP

The TCP/IP protocol suite is altering dynamically to mirror advances in know-how and will be thought of to symbolize the "protocol for the recent millenium. " The ABCs of TCP/IP displays those advances and comprises new assurance on: safe internet transactions functional subnetting examplesSecurity threats and countermeasures IPSecICMP usage and threatsThis finished reference presents execs with an summary of the TCP/IP suite and information its key parts.

Asterisk The Future of Telephony

It can be some time ahead of net telephony with VoIP (Voice over web Protocol) reaches severe mass, yet there is already large circulate in that path. loads of enterprises usually are not basically drawn to VoIP's promise of fee rate reductions, yet its skill to maneuver info, pictures, and voice site visitors over an analogous connection.


In July 1998, I obtained an electronic mail from Alfred grey, telling me: " . . . i'm in Bilbao and dealing at the moment version of Tubes . . . Tentatively, the recent positive factors of the publication are: 1. Footnotes containing biographical info and graphics 2. a brand new bankruptcy on mean-value theorems three. a brand new appendix on plotting tubes " That September he spent every week in Valencia, partaking in a workshop on Differential Geometry and its purposes.

Extra resources for CGI programming on the World Wide Web

Sample text

A>|, "\n"; print "", "\n"; exit (0); This program displays the current time, as well as a hypertext link to itself. If you click on the link to run the program again, the date and time that is displayed should change, but it does not, because the browser is retrieving the cached document. You need to explicitly tell the browser to reload the document if you want to run the CGI program again. Fortunately, there is a solution to this problem. If you don't want a virtual document to be cached, you can use the Expires and/or Pragma headers to instruct the client not to cache the document.

Print "Sorry! ", "\n"; } else { if (open (FILE, "<" . $plaintext_file)) { while () { print; } close (FILE); } else { print "Sorry! ", "\n"; } } exit (0); In this example, we perform a simple security check. ". This is so that the user cannot access files located outside of the document root directory. Instead of using the PATH_TRANSLATED environment variable, you can use a combination of PATH_INFO and DOCUMENT_ROOT, which contains the physical path to the document root directory. The variable PATH_TRANSLATED is equal to the following statement: $path_translated = join ("/", $ENV{'DOCUMENT_ROOT'}, $ENV{'PATH_INFO'}; However, the DOCUMENT_ROOT variable is not set by all servers, and so it is much safer and easier to use PATH_TRANSLATED.

The most basic output for a CGI program is a simple document in either plain text or HTML, which the browser displays as it would any document on the Web. However, there are other things you can do, such as: ● Return graphics and other binary data ● Tell the browser whether to cache the virtual document ● Send special HTTP status codes to the browser ● Tell the server to send an existing document Each of these techniques involves knowing a little bit about returning additional headers from the CGI program.

Download PDF sample

Rated 4.07 of 5 – based on 32 votes

About the Author