|The PHP logo displaying the Handel Gothic font. (Photo credit: Wikipedia)|
This is a quick bit of code that generates an XML Sitemap compatible with Google Sitemaps (Protocol Version 0.9). It can be used in conjunction with the Google Webmaster Tools to help them index your website, and hopefully get you a bit more traffic.
This code also provides a demonstration on how to change the Content Type of a served web page (in this case, how to make a PHP file to be treated like an XML file.
Generate a Google SiteMap with PHP - CodeProject®