gsitemap.php
------------

This is a simple PHP script which makes it easy to create Google Sitemaps.

Google Sitemaps is a new service that allows webmasters to specify how they
would like their pages crawled and indexed.

To use it, create a new script which includes gsitemap.php.  The script must
start with starturlset() and end with endurlset().

This code creates an empty sitemap:

<?php
include("gsitemap.php");

starturlset();
endurlset();
?>

Between the starturlset() and endurlset() calls, you need to add gensitemap()
in order to put URLs in for Google to use.

gensitemap(URL,[Last Modified],[Change Frequency],[Priority]);

All except URL are optional.

URL: The full URL to the document
Last Modified: The last modified date/time.  Must be in a specific format.
Change Frequency: One of always, daily, weekly, monthly, yearly or never.
Priority: Weighting of this page against other pages in your site.  Takes a
          value between 0.0 and 1.0 (0.5 is the default).

The last modified date can be easily obtained by calling updated().

updated(FILE);

Will store the last updated time and date of the file in $updated, which can
be passed to gensitemap().

Short example:

<?php
include("gsitemap.php");

starturlset();
   updated("index.html");
   gensitemap("http://www.domain.com/index.html",$updated,"daily","1.0");
endurlset();
?>

Generates a sitemap containing the URL http://www.domain.com/index.html,
specifying that it is updated daily and has maximum priority over other pages
on the site.  The above script can be submitted directly to Google, and will
be periodically downloaded with the new date automatically inserted when
index.html is changed.

It is better to get the filenames and other details from a database that
can simply be looped through using PHP.

It is a good idea to take a look at the Google Sitemaps FAQ on
http://www.google.com

For updates, see http://www.unsatisfactorysoftware.co.uk

DISCLAIMER
By using this script you are agreeing that I am not responsible
for any damage, loss of data, loss of money or any other event
that arises from direct or indirect use of gsitemap.php
