The Common Gateway Interface (CGI) is one of the most powerful methods of providing dynamic content on the Web. CGI is a generic interface for calling external programs to crunch numbers, query databases, generate customized graphics, or perform any other server-side task. Based on the best-selling CGI Programming on the World Wide Web, this edition has been completely rewritten to demonstrate current techniques available with the CGI.pm module and the latest versions of Perl. Topics include incorporating JavaScript for form validation, controlling browser caching, making CGI scripts secure in Perl, working with databases, creating simple search engines, maintaining state between multiple sessions, generating graphics dynamically, and improving performance of CGI scripts.
-
Chapter 1 Getting Started
-
History
-
Introduction to CGI
-
Alternative Technologies
-
Web Server Configuration
-
-
Chapter 2 The Hypertext Transport Protocol
-
URLs
-
HTTP
-
Browser Requests
-
Server Responses
-
Proxies
-
Content Negotiation
-
Summary
-
-
Chapter 3 The Common Gateway Interface
-
The CGI Environment
-
Environment Variables
-
CGI Output
-
Examples
-
-
Chapter 4 Forms and CGI
-
Sending Data to the Server
-
Form Tags
-
Decoding Form Input
-
-
Chapter 5 CGI.pm
-
Overview
-
Handling Input with CGI.pm
-
Generating Output with CGI.pm
-
Alternatives for Generating Output
-
Handling Errors
-
-
Chapter 6 HTML Templates
-
Reasons for Using Templates
-
Server Side Includes
-
HTML::Template
-
Embperl
-
Mason
-
-
Chapter 7 JavaScript
-
Background
-
Forms
-
Data Exchange
-
Bookmarklets
-
-
Chapter 8 Security
-
The Importance of Web Security
-
Handling User Input
-
Encryption
-
Perl’s Taint Mode
-
Data Storage
-
Summary
-
-
Chapter 9 Sending Email
-
Security
-
Email Addresses
-
Structure of Internet Email
-
sendmail
-
mailx and mail
-
Perl Mailers
-
procmail
-
-
Chapter 10 Data Persistence
-
Text Files
-
DBM Files
-
Introduction to SQL
-
DBI
-
-
Chapter 11 Maintaining State
-
Query Strings and Extra Path Information
-
Hidden Fields
-
Client-Side Cookies
-
-
Chapter 12 Searching the Web Server
-
Searching One by One
-
Searching One by One, Take Two
-
Inverted Index Search
-
-
Chapter 13 Creating Graphics on the Fly
-
File Formats
-
Outputting Image Data
-
Generating PNGs with GD
-
Additional GD Modules
-
PerlMagick
-
-
Chapter 14 Middleware and XML
-
Communicating with Other Servers
-
An Introduction to XML
-
Document Type Definition
-
Writing an XML Parser
-
CGI Gateway to XML Middleware
-
-
Chapter 15 Debugging CGI Applications
-
Common Errors
-
Perl Coding Techniques
-
Debugging Tools
-
-
Chapter 16 Guidelines for Better CGI Applications
-
Architectural Guidelines
-
Coding Guidelines
-
-
Chapter 17 Efficiency and Optimization
-
Basic Perl Tips, Top Ten
-
FastCGI
-
mod_perl
-
-
Appendix Works Cited and Further Reading
-
References
-
Additional Reading
-
RFCs
-
Other Specifications
-
Project Home Pages
-
Newsgroups
-
-
Appendix Perl Modules
-
CPAN
-
perldoc
-
-
Colophon
- Title:
- CGI Programming with Perl, Second Edition
- By:
- Scott Guelich, Shishir Gundavaram, Gunther Birznieks
- Publisher:
- O'Reilly Media
- Formats:
-
- Safari Books Online
- Print Release:
- June 2000
- Pages:
- 480
- Print ISBN:
- 978-1-56592-419-2
- | ISBN 10:
- 1-56592-419-3
Our look is the result of reader comments, our own experimentation, and feedback from distribution channels. Distinctive covers complement our distinctive approach to technical topics, breathing personality and life into potentially dry subjects. The animal featured on the cover of CGI Programming with Perl, Second Edition, is a mouse, a rodent of the family Muridae. True, or long-tailed, mice belong to the youngest group in the animal kingdom, approximately 15 million years old. Over 200 species of mice exist, but the most common is the house mouse. The house mouse is the second most widely distributed mammal on Earth, behind only humans. Despite their name, house mice often live in fields, but they usually live near human dwellings. House mice eat almost anything, but they prefer grains and grain products.
Mice reach sexual maturity at two to three months of age. After a gestation period of 20 to 21 days, they deliver a litter averaging six blind, bald, helpless babies. House-dwelling mice can bear young continually, but if overpopulation becomes a problem some female mice will remain infertile.
Mice are often considered to be pests, or worse. They can cause serious crop damage, as well as food contamination. In addition, mice can carry viral, bacterial, and parasitic disease. Despite all this, mice were worshipped in parts of Asia Minor and Greece in ancient times. Today, mice continue to hold an important part in popular culture, often appearing as the heroes of cartoons and books that are ostensibly intended for children, such as Stuart Little, Pinky and the Brain, and, of course, Mickey Mouse. Nicole Arigo was the production editor and copyeditor for CGI Programming with Perl, Second Edition. Emily Quill proofread the book. Melanie Wang, Mary Anne Weeks Mayo, and Jane Ellin provided quality control. Ellen Troutman Zaig wrote the index.
Edie Freedman designed the cover of this book, using a 19th-century engraving from the Dover Pictorial Archive. Emma Colby produced the cover layout with QuarkXPress 4.1 using Adobe's ITC Garamond font.
Alicia Cech and David Futato designed the interior layout based on a series design by Nancy Priest. Mike Sierra implemented the design in FrameMaker 5.5.6. The text and heading fonts are ITC Garamond Light and Garamond Book. The illustrations that appear in the book were produced by Robert Romano and Rhon Porter using Macromedia FreeHand 8 and Adobe Photoshop 5. This colophon was written by Clairemarie Fisher O'Leary.
