#native_company# #native_desc#

Building Static Sites

By Loris Tissino
on April 20, 2001

The Problem
Sometimes you may need to generate a static version of your
dynamically-generated web pages. For instance, you might have to
produce a web-cd, or you might want to offer on your website a
compressed version of some content to be downloaded and read
off-line. In some cases, you could need to show a work-in-progress
of a web site you are developing to someone who doesn’t have a
connection to the Internet (yes, sometimes it happens). Or you
might want to publish your web pages at an Internet site which
doesn’t offer you server-side programming (such as most of free hosting sites).
In these circumstances, what you have to produce is a lot of
static web pages, viewable by a user who doesn’t have a webserver
running, or hosted where you can’t control a dynamic generation.
What if you wanted to use PHP to produce those pages, taking
advantages from it, with minimum effort? Here below I’ll describe
something you could do quite easily. Extra ideas on this base will be welcome.

What you need

You’ll need only some tools you probably already have: a webserver, PHP,
and a browser that you can control in batch mode, such as lynx (present in
most Linux distributions, and freely available for other platforms at lynx.browser.org).


Download: loris20010420.zip