Christoper L.T. Brown and Scott Zimmerman
Sams.net
201 West 103rd Street, Indianapolis, Indiana 46290
FIRST EDITION
All rights reserved. No part of this book shall be reproduced, stored in a retrieval system, or transmitted by any means, electronic, mechanical, photocopying, recording, or otherwise, without written permission from the publisher. No patent liability
is assumed with respect to the use of the information contained herein. Although every precaution has been taken in the preparation of this book, the publisher and author assume no responsibility for errors or omissions. Neither is any liability assumed
for damages resulting from the use of the information contained herein. For information, address Sams.net Publishing, 201 W. 103rd St., Indianapolis, IN 46290.
International Standard Book Number: 1-57521-072-X
Library of Congress Catalog Card Number: 95-72942
99 98 97 96 4 3 2 1
Interpretation of the printing code: the rightmost double-digit number is the year of the book's printing; the rightmost single-digit, the number of the book's printing. For example, a printing code of 96-1 shows that the first printing of the book
occurred in 1996.
Printed in the United States of America
All terms mentioned in this book that are known to be trademarks or service marks have been appropriately capitalized. Sams.net Publishing cannot attest to the accuracy of this information. Use of a term in this book should not be regarded as affecting
the validity of any trademark or service mark.
President, Sams Publishing:
Richard K. Swadley
Publisher, Sams.net Publishing:
George Bond
Publishing Manager
Mark Taber
Managing Editor:
Cindy Morrow
Marketing Manager:
John Pierce
Acquisitions Editor
Mark Taber
Development Editor
Fran Hatton
Software Development Specialist
Merle Newlon
Production Editor
Mary Inderstrodt
Technical Reviewer
Brian Kent-Proffitt
John W. Nelson
Editorial Coordinator
Bill Whitmer
Technical Edit Coordinator
Lynette Quinn
Formatter
Frank Sinclair
Editorial Assistant
Carol Ackerman
Cover Designer
Jason Grisham
Book Designer
Alyssa Yesh
Copy Writer
Peter Fuller
Production Team Supervisor
Brad Chinn
Production
Georgiana Brigs, Michael Brumitt, Mike Dietsch,
Tom Dinse, Judy Everly, Jason Hand, Sonja Hart,
Mike Henry, Ayanna Lacey, Paula Lowell, Casey Price,
Bobbi Satterfield, Josette Starks, Andrew Stone,
Susan Van Ness, Todd Wente, Colleen Williams
Preface
Introduction
Part I Getting Started on the World Wide Web
Chapter 1 Internet Technology Primer
Chapter 2 Everything You Need
Chapter 3 Connecting to the Internet
Part II Up and Running Fast
Chapter 4 Windows 95 Dial-Up Networking and TCP/IP
Chapter 5 Webmasters Guide to Exchange and Eudora
Chapter 6 Webmasters Guide to Explorer and Navigator
Chapter 7 Webmasters Guide to FTP and the Newsgroups
Chapter 8 Putting Your Windows 95 Web Server Online
Part III HTML, The Language of the Web
Chapter 9 A Guided Tour of HTML
Chapter 10 Image Mapping and Multimedia
Chapter 11 Introduction to Web Forms and CGI
Chapter 12 Netscape Extensions and HTML 3.0
Chapter 13 Putting HTML to Work Building a Sample Site
Part IV Expanding Your Internet Server
Chapter 14 Announcing Your Web Site to the World
Chapter 15 Commerce on the Web
Chapter 16 Maintaining and Tracking Your Web Site
Chapter 17 Serving Email on the Internet
Chapter 18 Running an FTP Server and Remote Web Site
Administration
Chapter 19 Databases and the Web
Chapter 20 Internet Robots and More Security Issues
Part V Empowering Your Internet Server
Chapter 21 Web Site Programming with Perl
Chapter 22 Power CGI Programming with C/C++
Chapter 23 WinCGI and SQL with Visual Basic
Chapter 24 Interactive Web Programming with Java
Chapter 25 The Future of the Web
Part VI Appendixes
Appendix A Internet Service Providers
Appendix B Discussions of Windows Web Servers
Appendix C Internet Resources for the Win95 Webmaster
Appendix D Selected RFCs
Appendix E Discussions of 36 Internet Robots
Appendix F List of HTML Character Entities
Appendix G HTML Encyclopedia
Appendix H Windows CGI 1.2 Interface
Appendix I What's on the CD-ROM
Bibliography
Glossary
Index
The World Wide Web is a very powerful tool for communicating and an essential tool for modern business. Unless you've been hiding under a rock for the last year, you already know that the Web has become the avenue of choice for people who need to travel
on the information superhighway. This popularity results from the ease with which information (the merchandise of the Information Age) can be obtained on the Web. As more and more people use personal computers at home and at work, the Web could become as
commonplace as the telephone or the television. Indeed, there were more personal computers sold in the U.S. in 1994 than TV's. And when you run your own Web site, those PC's could be your customers.
If you've had a chance to use the Web (also called WWW or W3), perhaps you have wondered how it all got there in the first place. The answer is that anyone can help build it. Parts of it are being torn downand new parts are going ineveryday.
Anyone with a computer and a message can start a Web site.
Setting up a Web site can be beneficial, whether for business, education, research, or pleasure. Web Site Construction Kit for Windows 95 will show you how to do it. It is up to you to determine your message to the rest of the world.
We designed this book for the SOHO (small office, home office). We have synthesized our knowledge of the Web down to the essential details that a time-pressed business person needs to know. Our goal in writing this book was to make it work like a
blueprint works for a carpenter. It will guide you through the entire process of setting up and managing a Web site on Windows 95. (And the accompanying CD includes the complete suite of software you will need.) Many parts of the book are optional.
If learning about the Internet seems overwhelming at times, don't worry, you can always come back to the advanced parts later.
Web Site Construction Kit for Windows 95 goes way beyond the basics of using the Internet, and into the realm of actually being a part of the Internet! Until now, setting up a Web site has required deep knowledge of several Internet protocols and
lots of experience. Many people still assume that you need to be a UNIX system administrator to run an Internet server. Not only is this untrue, but we believe that almost no other book will show you how easy and inexpensive it really is. (The one humble
exception being our first book, Web Site Construction for Windows NT.)
The World Wide Web changes extremely fast. We have made every effort to verify that the information in this book is accurate at the time of printing. We have also endeavored to pack this volume with the most useful information you are likely to need. We
hope you will find that our cross-referencing to other sections in the book and to the Internet itself is a valuable aid to furthering your understanding. Unfortunately, some books about the Web offer a lot more fluff than details. Please don't buy another
book about the Web until you compare it head-to-head with ours.
Good luck in your efforts. Perhaps we will be among the many who will visit your home page someday soon.
Scott Zimmerman, Christopher L. T. Brown
San Diego, December 1995
As with any technical book, this book could not have been completed without the help of many others. We extend our sincere appreciation to Brandon Plewe for providing most of the HTML material for Chapter 5. We would like to thank Geary Bulrice for
always asking why and how. Equally important was Drake Rowe, for being brave enough to edit the very first draft. Thanks to Bob Denny for permission to reprint the WinCGI specification. We greatly appreciate the permission from Martijn Koster to include
some of his research material on Internet robots and for donating his time to help review Chapter 15. Hershey Quintana contributed research and graphic editing.
Chris Wensel kindly permitted us to include the CGI Perform software and documentation. Richard Graessler was especially helpful with the software engineering needed to run multiple EMWAC servers. No less thanks goes to J.J. Allaire for providing the
software and documentation for Cold Fusion.
We also owe our gratitude to the members of the following listservers, because without their advice, our knowledge of NT and the Web would not be what it is today: IWNTUG@IWNTUG.ORG, webserver-nt@DELTA.PROCESS.COM, http_winnt@Emerald.NET, and anyone we ever talked to about the Internet. Kudos to Stirling Goetz for running a fun and informative
San Diego NT User's Group.
Special thanks to the authors of the fine software packages we include. We hope our gentle readers will appreciate the hard work that goes into the creation of all the software needed to make a Web site tick.
Scott Zimmerman (scottz@sd.znet.com) has been developing software for 15 years. He has programmed in more than two dozen languages, primarily C++ and Visual Basic. Currently, he serves as Software
Engineering Manager with Azron, Incorporated in San Diego. Azron produces an industry-leading solution for electronic medical records on Windows 95 and Windows NT. Zimmerman's interests include nature conservation, science and technology. In a previous
career, he won the World Overall Frisbee Championships eight times.
Christopher L. T. Brown (clbrown@netcom.com) is a Senior Chief in the U.S. Navy. For the past 15 years, he has worked in the Naval Command Control and Communications. Brown has written programs in several
computer languages including Basic, Pascal, C, and C++. In addition to proprietary operating systems, he has worked with UNIX, Macintosh, DOS, Windows, Windows NT, and Windows 95. During the past three years, Brown has dedicated most of his time to
evaluation and operation of Windows NT as an Internet platform. In addition to his Navy career, he runs a World Wide Web publishing and consulting company called Final Bit Solutions, which maintains an active Internet Web server as part of its services.
Brown's interests include cryptography, surfing, skiing, and wildlife.
This book is intended for anyone who wants to take advantage of Windows 95 to publish a home page on the World Wide Web. This is your complete guide to building a very economical presence on the Internetquickly and professionally. Although
it would be helpful if you had a basic understanding of Windows 95, that isn't essential beforehand, because this book covers all the necessary information related to building your own Web site and Internet server. Windows 95 is very intuitive, and most
tasks can be easily accomplished with point-and-click mouse commands.
If you don't consider yourself to be very familiar with the Web, you'll see that this book will teach you a lot about how the Web really works, as opposed to other books that only talk about using the Web.
We start at the very beginning, but in some of the later sections we assume the reader has some basic knowledge of the World Wide Webat least from the client side. Given the explosive growth of the Internet, nearly everyone who works with
computers has had an opportunity to surf the Net with a Web browser. The purpose of this book is to show you how to set up your own Web server so that the rest of the world can connect to your computer and see what message or
product (often called content) that you have to offer.
If you were reading this book in a Web browser, each of the italicized words and phrases in the previous paragraph would have been underlined to indicate that a mouse click would take you to further information about that topic. We can't do that in this
book, but we can substitute with boxed tips and notes similar to pop-up help, like those below. As you read through the book, you will notice that we use boxes such as these to point out highlights, raise caution when appropriate, and define new terms. The
following is an example.
HTML (HyperText Markup Language) and HTTP (HyperText Transfer Protocol) are the languages of the Web, in a sense. Despite its name, HTML isn't actually considered a programming language. In short order, you will see just how easy it is. We will continue
to explore HTML throughout the book, and by the time you finish, you will be very familiar with it. But do not fear; you do not need to know a programming language before you start.
On the Web, client/server conversations take place using HTTP. You do not ordinarily need to know the low-level details of HTTP to run a Web site.
In addition to plenty of HTML code, we discuss several programs written in Visual Basic, C, Perl, and Java. All of the programs are ready to run, so you don't need to know programming. However, we also include the source code so that those familiar with
these languages can study the programs for further information or to make enhancements.
This book does not cover internetworking or the Internet protocols in any significant way. The Internet is a very large topicway too large to completely cover in one book. You might find that additional research into Internet protocols and
security techniques will be helpful over the long run. You will find some useful references in Appendix D and in the Bibliography.
Good question. The brief, executive answer is, A computer, an operating system, a Web server program, some content that other people would like to see, and usually, a connection to the Internet. Perhaps the fact that this sounds so open-ended is why so
many different kinds of new Web sites appear each week. What you can do with a Web site is limited only by your imagination.
A Web site provides the world with a graphical interface to information that you have to offer. Some companies are using the Web to deliver 24-hour customer service. Some use the Web to provide electronic software distribution, advertise job openings,
or sell goods and services. Some places run Web sites to collect data from remote computers, such as large-scale research projects or international sales forces. Some companies use the Web internally to publish their employee handbook or provide an
electronic suggestion box. Even the White House runs a Web site.
The World Wide Web is aptly named. By analogy to a spider's web, you can think of the Internet as the strands of the spider's web and the servers on the Internet like the intersections of the strands. The World Wide Web literally covers the globe. By
the time you read this, there will likely be about 20,000 servers (intersections) on the Web. Each server on the Web is considered a Web site.
One little-known fact about the Web is that it not only works on the global Internet, but it is also a great idea for an Intranet. In other words, Web forms and databases are a terrific way for a company to communicate and deliver data across a
LAN or WAN. In this respect, Web pages can replace or supplement multiuser database products such as Lotus Notes. We will have more to say about these exciting possibilities later.
There are many reasons to use Windows 95 as your Web site operating system. The first thing that comes to mind is that you probably already own Windows 95. Roughly 20 million people purchased Windows 95 during 1995and it was only on sale for four
months! It is estimated that another 20 to 50 million Windows 3.1 users are taking a wait-and-see attitude before choosing to upgrade to Windows 95.
Here are a few other good reasons to use Windows 95 for a small business or personal Internet server:
Today, companies can ill-afford not to have an Internet presence. One reason is that traditional advertising is expensivewhether you choose the Yellow Pages, newspapers, magazines, TV, or mail. We certainly don't want to guess which marketing
vehicle is best for your business, but this book will show you how you can get on the Net for a lot less than some of the other options.
Another compelling reason to be on the Web is that we live in a very competitive global economy, and no business can afford to overlook an opportunity to reach a new market. With a Web site, you can reach people faster than with any other medium. People
in various professional fields all over the world use the Internet on a daily basis to purchase products. Furthermore, online documents can be changed easily with instantaneous effect, eliminating the waste and potential problems of printing obsolete
information. And if your business provides customer support by phone, having a Web site can save time and money, and deliver greater customer satisfaction.
As the number of Internet Service Providers (ISPs) continues to grow, the cost of a monthly connection continues to drop. A small company can easily get by with a full-time modem connection to the Internet, which some service providers offer at rates as
low as $90 per month. That includes domain-naming services as well. As ISDN (Integrated Services Digital Network) continues to expand, it is also becoming a popular and cost-effective method of obtaining high-speed Internet access. You will find these
terms, as well as everything else you need to know about choosing an Internet service provider, in Chapter 3, "Obtaining Your Internet Account."
In the midst of all the Internet hype, you've probably heard stories about hackers and viruses. The term hacker has come to refer to someone who tries to break into computer systems to play, steal information, or sabotage network resources. It is
true that there are risks associated with opening your network to the Internet. But none of the risks are unmanageable, and the risks of keeping a modern business staff locked up in its own world are certainly far greater. Amazingly, the topic of Internet
security risks often comes up without mention of the many risks of physical theft at the location of the computer! We don't need to point out that it only takes one hole to sink a boat.
Throughout the book, we discuss several security measures that you can deploy using the software we have included on the CD-ROM, including the anti-virus software. However, deep coverage of Internet security, is beyond the scope of this book. We
encourage you to see the Bibliography for further references.
And now, let's get started.