How to Set Up and Maintain a Web Site
Examples from Chapter 9
Important notice: The CGI scripts contained here will
only run correctly when they are installed as executable scripts on a
Web server. When viewed locally, your browser will display only the
source code.
Basic Scripts
- plaintext.pl
- html.pl
- calendar1.pl
- witty.pl
Retrieving Information from the Server
- A script to print out all the environment variables
- Retrieving the query string: the calendar2.pl script
- Generating fill-out forms: the calendar3.pl script
CGI Scripting Libraries
- Using the
CGI.pm
library: the calendar4.pl script
- A generic script template with CGI.pm
Writing Safe Scripts
- An unsafe finger script
- A safe finger script
Longer Examples
- feedback.pl, a form for sending in comments by mail
- pict_search.pl, a picture database search script
- counter.pl, preserve state information between calls to a script
- preferences.pl, remember a user's preferences for an extended time
Creating Graphics on the Fly
- pict_thumbnail.pl, picture database search script with thumbnails
- postscript.pl, postscript to GIF on the fly
- Create GIF files directly in Perl 5 using
GD.pm
- sine.pl, draw a sine curve using
gnuplot
Advanced Techniques
- background.pl, do a calculation in the background and mail result to user
- countwords.pl, a file upload script
- newframe.html, pop up a new window
- feedback.html, combining CGI scripts with frames
- calendar5.pl, using frames with the calendar script
- pull.pl, a running digital clock using client pull
- nph-push.pl, a running digital clock using server push
Up to:
Lincoln D. Stein, lstein@genome.wi.mit.edu
Whitehead Institute/MIT Center for Genome Research
Last modified: Sat Sep 28 20:54:16 EDT 1996