365X24Live home
||
sitemap
CGI Programming Unleashe
C O N T E N T S
Chapter
1
What CGI Programs Can and Can't Do
What CGI Is Useful For
Simple Tasks
Intermediate Tasks
Advanced Tasks
What CGI Is Not Useful For
What CGI Programs Can Do
What CGI Can't Do
Summary
Chapter
2
The CGI Specification
CGI Overview
Languages
CGI Methods
GET Method
POST Method
HEAD Method
Interface Specification
Environment Variables
Command Line
Standard Input
Standard Output
Examples
More Information
Summary
Chapter
3
Crash Course in CGI
Why CGI Exists
Wanna Have a Conversation?
Making a Connection
Getting Down to Business
Parlez Vous
Environment Variables?
Server-Specific Environment Variables
Client-Specific Environment Variables
Request-Specific Environment Variables
Taking It All In
REQUEST_METHOD
Strange Looking Data
RSVP
Types of Responses
Headers
Some Things to Consider
Summary
Chapter
4
Comparison of the Various CGI Programming Libraries
CGI Libraries for C Programming
CGIc 1.05
CGI-HTML 1.21
The C++ CGI Class Libraries
AHTML
Kelly Black's CGI C++ Classes
Perl Libraries
CGI-Lib
Summary
Chapter
5
Designing Your CGI Application
Sizing It Up
What Does the Application Have to Do?
Preliminary Sketches
Scoping It Out
Pseudocode
Planning for Processing
Gathering Input
Processing
Generating Output
The Fine Print
Libraries
Languages
Share with Your Neighbors
Planning for the Future
You Can Take It with You
Server Software
Operating Systems
Reuse
Summary
Chapter
6
Testing and Debugging
The Process and Methodology
The Review Cycle
At Your Command
Solitary Confinement
Preventing Harm to Original Data
Is Not Easily Accessible to General Users
Ladies and Gentlemen, Start Your Testing
The Testing Process
Debugging the Application
Common Errors
Make Use of Error Logs
Debugging Flags
Re-Testing Your Application
Summary
Chapter
7
Server-Side Includes (SSI) and Gateway
What Are Server-Side Includes, and What Are They Useful For?
Comparison of SSI and CGIs
Which Servers Support SSI?
Cern
Apache
A List of Useful SSI Directives
Some SSI Examples
Counter
Random Image Generator
The Protocol of the Web: HTTP
Gateways: Accessing Other Protocols through the Web
Improving Existing Gateways
Some Gateway Examples
finger
Form-by-Mail
Using the Web as a Standard Internet Access Interface
Summary
Chapter
8
Forms and How to Handle Them
What Is an HTML Form?
What Can Forms Do?
What Can't Forms Do?
Creating HTML Forms
A Sample HTML Form
HTML Form Tags
INPUT TYPE=TEXT
INPUT TYPE=SUBMIT
INPUT TYPE=RESET
INPUT TYPE=RADIO
INPUT TYPE=chECKBOX
INPUT TYPE=IMAGE
INPUT TYPE=HIDDEN
TEXTAREA
SELECT
Future FORM HTML Tags Proposed in the "Draft HTML 3.0 Spec"
Form Style
A Sample Form
Handling Form Submissions
REQUEST_TYPEs GET versus POST
Form Data Decoding
Choosing the Programming Language
A Sample CGI Form Handler Program
Forms-Based Intranet/Internet Client/Server Applications
Forms Ready Reference
Brief Outline of GET and POST Mechanisms
Brief Outline of Form Encoding
Summary
Chapter
9
Security
Is CGI Insecure?
CGI Is a Power Tool-Use with Care
General Internet Security Issues
Alternatives to CGI
Can CGI Be Used Securely?
Security Is the Responsibility of Both Programmer and Administrator
What Can a Web Server Administrator Do to Improve Security?
What Can a CGI Programmer Do to Improve Security?
Summary
Chapter
10
Databases
Database Interfaces
Front End CGIs
Web Indexing
Indexers
Search Engines
Large Scale Databases
Summary
Chapter
11
Searching and CGI
Searching Information on the Web
Most Important Search Engines
Gathering Information on the Internet
Searching Interfaces for the Final User
CGI Work in the Background
Developing a Simple CGI for a White Pages Database
Future Improvements
Summary
Chapter
12
Imagemaps
Imagemaps-Myth, Metaphor, and Meaning
Anatomy of an Image-Pixels and Coordinates
HTML, ISMAP, and QUERY_STRING- Passing Imagemap Information to a CGI Program
Flatland Revisited-An Introduction to the Standard Imagemap System
Imagemap.c-The Standard Imagemap Handler
.map Files-Describing Shapes the Imagemap Way
Client-Side Imagemaps and Magic MIME Types
Client-Side Imagemaps
The .map Magic MIME Type
Take a Walk on the Server-Side-Developing Imagemap Code
Creative Imagemap Programming-Breaking the Paradigm with Glorglox
Imagebuttons-The End of Imagemaps Is Nigh
The HTML Side of Imagebuttons
But What Does It All Mean?
Summary
Chapter
13
Proprietary Extensions to Servers
Server Push
HTTP Cookies
Other Server Extensions
WebServer/400
Apache Modules
Jigsaw Resources
Netscape and Microsoft
Summary
Chapter
14
WinCGI The Basics
Your Very First WinCGI Program
Authentication
Summary
Chapter
15
Windows CGI: Database Backending
Database and Data Formats
Flat File Database
Relational Database
Communicating with Databases
Flat File Read
ODBC
SQL
DDE
Database Tools
Visual Basic
Delphi
C/C++
Other Tools
Creating Your Database
The Data
The Tools
Communications
The Code
Using the Database
Summary
Chapter
16
DOS CGI: The Basics
The Basics
CONTENT_FILE
OUTPUT_FILE
Other Environment Variables
Languages
BAT and CMD Files
BASIC and Its Cousins
Perl for DOS
C/C++
Limitations
Resources
Converting Other CGI Programs and Information
Web Server Software
DOS Programming Books
Summary
Chapter
17
Voting Booths
Voting Booths-Gathering and Managing Opinions
Starting Simple-A Low-Level Voting Booth
Bad Voting Booth, Good Code-Technical Merits of greenegg.cgi
Use of Associative Arrays for the Handling of GET/POST Method Data
Immediate Error Trapping Using the Statement Modifier Form of if
Slurping Data with @array = <FILEHANDLE>;
Use of Output Filter to Provide stdin to /usr/sbin/sendmail and sendmail -t Flag
Use of print FH<<END; ... END Syntax When Outputting Formatted Sections
A Voting Booth Wish List
Multistate CGI Programs-More Than Just a URL
Generating Meaningful Reports
Sorting Lists in Perl
Average and Standard Deviation-Statistics 101
Visual Output-Creating Graphs
Handling Data Internally and Externally
Summary
Chapter
18
Discussion Forums
Discussion Forums-Everything Old Is New Again
Discussion Forum Display and Bistate CGI Programming
Useful Data Fields for Discussion Forums and Parent/Sibling/Child Relationships
A Discussion Forum Example
Discussion Forum Administration
Remove Posting by Date
Remove Thread by Date
Remove Posting by Author
Remove Individual Postings
Remove Individual Threads
Discussion Forum Additions
Selective Sorting Criteria
Search Engines
Registered Users and .htaccess Schemes
Summary
Chapter
19
Chat Rooms
Chat Rooms-Getting a Life on the Internet
Prescription for a Chat Room
Getting chat.cgi to Work for You
Chat Room Systems and Entry Pages
Extension to the Basic Chat Room
Intelligent User Identification
ChatMaster-The Chat Room Administrator
Private Messaging
Other Chat Room Features and Examples
Alternatives to CGI Chat Rooms
IRC-Internet Relay Chat
PowWow
Java Chat Rooms
talk and ytalk-Old UNIX Standbys
MUD, MUSH, and MOO Systems
Summary
Chapter
20
Multi-User Games and CGI
Multi-User Games
Planning
Outlining
Coding
Summary
Chapter
21
Tracking Users
Why Do We Need to Track Users?
The Essence of Web Marketing
Parsing Access Logs
What Is an Access Log?
Environment Variables
Creating a Pseudo Access Log File
Logging Accesses
How to Implement Tracking CGIs
index.cgi
index.shtml
Including CGIs in Images
A Simple Web Counter
Calling counter.cgi
Locating Users Geographically
Discussion of Feasibility
Introduction to NSLOOKUP and WHOIS
Limitations of Tracking Users Through IP Addresses
Cookies
Other Methods of Tracking Users
Fingering Dial-Up Servers
The Ethics of Tracking Users
Accessing This Chapter Online
Summary
Chapter
22
Simple Order Entry
What This Chapter Covers
Forms and the Data They Produce
The FORM Tag
Methods
Environment Variables
What the Raw Data Looks Like
Processing the Data with Perl
A Simple Parsing CGI
The Output of the Simple CGI
Parsing the Data: Round 2
Accepting Forms by METHOD=GET
Checking for Errors
Embedding Information in the Form
What to Do with All This Data?
The Things You Keep
Security Issues
Transaction Security
CGI Security
Summary
Chapter
23
Shopping Carts
What Are Shopping Cart CGIs?
What This Chapter Covers
The Basic Elements of a Shopping Cart CGI
The Product Catalog
Using Hidden Input Fields to Maintain State
Other Ways of Keeping Track of State
htaccess and REMOTE_USER
Session ID Embedding
HTTP Cookies
Cookie Recipes
Setting Cookies with <META HTTP-equiv>
Building Customer Profiles
Database Management
Using DBMs
The Result of Your Labors, cart.cgi
Summary
Chapter
24
Java and JavaScript Alternatives to CGI
Java: Bringing More Dynamics to the Web
What Is JavaScript?
Differences between Java and JavaScript
Comparison of CGI and Java/JavaScript
Communication between Java and CGI
Java to CGI
CGI to Java
Java and JavaScript
JavaScript
Each Technique Has Its Place
Future Improvements
Where to Get More Information
Summary
Chapter
25
ISAPI
What Is ISAPI All About?
ISAPI Background and Functionality
Internet Server Applications (ISAs)
Internet Server API Filter
Implementation Complications
Summary
Chapter
26
NSAPI
Why NSAPI?
NSAPI versus CGI
Performance
Process Space
Data and Function Access
NSAPI and the Server's Processes
HTTP Request/Response Process
Server Application Functions
Controlling Function Use
Functions and Features
Server Application Function Prototype
Parameter Blocks
Sessions
Request Structure
Functions, Variables, and Their Responses
Implementation Considerations
Cross-Platform Capabilities
Informational Resources
Programming Knowledge
Debugging
The Future of the NSAPI
Summary
Chapter
27
ActiveXControls
ActiveX Concepts and Background
OLE and COM
"Containers" for Anything
ActiveX, Son of OLE
Component Categories
Why They Matter
Functionality
Financials
ActiveX Controls in Action
ActiveMovie
HTML Layout Control
Other Controls
Developing ActiveX Controls
Underlying Programming Basics
Control Framework
Tools for Creation
Integrating Controls with Your Web Site
The <OBJECT> tag
Internet Component Download
ActiveX Viability and Directions
Who's Going to Develop?
Opening the Standard?
Going Cross Platform
Competitive Standards
Netscape and ActiveX
Market
Resources
ActiveX SDK
OLE and OCX Controls Books
Web Sites
Existing Developers (Visual Basic and C++)
Summary
Chapter
28
ActiveX Scripting
Blending HTML and Programming
Script Tag
Interface Components
The ActiveX Scripting Model
IE 3.0 Browser Object Model
ActiveX Controls and Components
VBScript Objects
The Languages
JavaScript
VBScript
Scripting Hosts and Engines
Hosts
Engines
Resources
Going from VB to VBScript
VBScript Language and Runtime References
Web Sites
Summary