www.opensourcewebbook.com
 
     
  Page Path - Contents - CGI  
     
 
Home
About
Foreword
Reviews
Authors
Purchase
Errata
Sourcecode
Resources
Tools
Contents
Linux
Apache
Perl
MySQL
WML
CGI
mod_perl
SSI
Embperl
Mason
PHP
     

The Common Gateway Interface

Thus far we have dealt only with static web pages, which are simply HTML text files that don't change except when the file is edited by hand or generated by WML. In this chapter, we learn about dynamic web pages, which contain content that is created when requested. now all that Perl you learned in Chapter 4 and MySQL you learned in Chapter 5 will come in handy.

In this chapter, we discuss the basic way to create dynamic web pages: the Common Gateway Interface (CGI), a standard for communication between a client and the server. CGI scripts can be written in almost any language; we like Perl. Perl is well suited to the types of text processing commmon for many tasks, such as search engines and forms interfaces. Other benefits of Perl include portability, ease of programming, and overall computational power and performance. And to top it off, the Perl module CGI.pm is a useful way to make Perl CGI script writing quick and easy.

CGI Links

Idiot's Guide to solving Perl CGI problems
Perl CGI FAQ
WWW Security FAQ

 

     

EXAMPLES:

hello.cgi:
hello.cgi
hello.cgi contents

hello2.cgi:
hello2.cgi
hello2.cgi contents

hello3.cgi:
hello3.cgi
hello3.cgi contents

info.cgi:
info.cgi
info.cgi contents

info2.cgi:
info2.cgi
info2.cgi contents

simple.cgi:
simple.cgi
simple.cgi contents

info3.cgi:
info3.cgi
info3.cgi contents

info4.cgi:
info4.cgi
info4.cgi contents

path_info.cgi:
path_info.cgi/foo/bar
path_info.cgi contents

nameage.cgi:
nameage.html
nameage.html contents
nameage.cgi contents

widgets.cgi:
widgets.html
widgets.html contents
widgets.cgi contents

widgets2.cgi:
widgets2.cgi
widgets2.cgi contents

widgets3.cgi:
widgets3.cgi
widgets3.cgi contents

Project - age.cgi:
age.cgi
age.cgi contents