This page briefly describes the workings of this site, for those who are interested. It's basically a collection of links to the perl scripts that generate the page.
Back to Tom Paton's Homepage.
This script handles all requests for .xml files. These requests are directed to this script by the .htaccess file. This script receives the details of the request via environment variables. It basically gets xmlwebpage.pl to generate a .html file from the requested .xml, updates the counters and returns the generated file. To save unnecessary generation (a little slow) it only regenerates the .html file if the .xml has been modified since the last generation or the file is unavailable or expired (greater than a day old). The hit count information is appended to the generated .html file. This page also determines if the referer was a search engine and if so, forces a generation of the web page with a "Search Results" section.
This script parses an .xml file (using XML::Parser) and spits out .html code to display the contents. It has nifty features like counting the number of <link>s in the page and automatically creating the "What's New" and "Currently Enjoying" sections. Another feature is a "Search Results" section containing all the links matching keywords extracted from the referer url. This is intended for people who find the page when searching for something that may be on the page.
This script formats and presents the counter results.
This is the source file for my main page. The xml allows me to use useful tags to delimit the information and I can also include raw html where appropriate.
This document describes the xml tags used by my programs. No DTD is used because XML::Parser ignores it...
This file controls access to the site, and in particular, associates the .xml extension with the CGI.pl script.
This is one of the cascading style sheets used on this site. This simplifies the generated HTML considerably where it works...
This is the first CGI program I wrote (in C++) and it simply echoes the contents of the environment variables. I started writing little classes to encapsulate the CGI and HTML interfaces but kind of gave up when I found perl...
This file stores the hit information for the site. It is basically read into a hash in the perl scripts so stores all sorts of information. The different classes are prefixed with "FILE" and so on to enable the showcount.pl script to do some nicer formatting.
The following links were found to be useful while learning all this stuff.