Google Sitemap Generator

I was dissapointed when I saw the current Google sitemap generators available, so I wrote one.

– Generates Google sitemaps
– Generates Yahoo! sitemaps
– Generates plain text sitemap
– Splits sitemaps up into smaller files (as per Google’s instructions)
– Creates sitemap index file
– Pings Google/Yahoo!

This is the first release, so there’s probably some bugs in there somewhere. Please let me know if you find any. There are some examples in the zip file.

To best use the classes, set the variables on the page you call the class from, rather than editing the class file (so changes aren’t lost when you upgrade).


$sitemap = new Google_Sitemap();
$sitemap->doPing = false;
$sitemap->gzip = false;
$sitemap->baseurl = “”;


Version 0.2 – 14/05/2007

Fixed problem with script using too much memory when trying to sitemap hundreds of thousands of pages.

Leave a Reply

Your email address will not be published. Required fields are marked *