Friday, May 4, 2012

Generate a Google SiteMap with PHP - CodeProject®

The PHP logo displaying the Handel Gothic font.
The PHP logo displaying the Handel Gothic font. (Photo credit: Wikipedia)
Introduction to the article

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®
Enhanced by Zemanta

No comments: