A Simple PHP Google Sitemap Generator
Read-Write-Web, Snippets, Tools, XML February 26th, 2009
I just hacked together a very simple class and CLI script to help me generate Google sitemap XML on a daily basis using PHP. If you have not yet heard of it: Google sitemaps help you promote your content if you have certain deep links that only show up if a visitor for example performs a search and clicks a result.
Check the documentation of the Google Sitemap Format
Here is the code: Google Sitemap Generator
It works like this:
$ php generate_gsitemaps.php; #will generate your standard sitemap
$ php generate_gsitemaps.php -e > my_sitemap.xml; #echo sitemap xml to another file
Example: generated_example_sitemap.xml
Have fun being found!
About





