Home > Coding > Google Sitemap Generator

Google Sitemap Generator

January 31st, 2007 Leave a comment Go to comments

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

Features:
– 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).

E.g.

[php]
$sitemap = new Google_Sitemap();
$sitemap->doPing = false;
$sitemap->gzip = false;
$sitemap->baseurl = “http://www.noodles.net.nz”;
[/php]

Download:

http://www.noodles.net.nz/downloads/sitemaps.zip

Version 0.2 – 14/05/2007

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

Categories: Coding Tags:
  1. No comments yet.
  1. No trackbacks yet.