News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PHPFive.net:
Creating a dynamic Google sitemap using the PHP5 SimpleXML extension
May 22, 2006 @ 17:59:06

On PHPFive.net, there's this new tutorial dealing with the creation of a dynamic Google sitemap with the help of SimpleXML - basically, the paths for Google to follow to best index your site.

This tutorial demonstates the PHP5 SimpleXML extension by using it to update a Google sitemap dynamically. It assumes that you have a basic understanding of PHP and are familiar with XML. SimpleXML represents a XML file as a native PHP object and this makes it a good deal easier to work with than either DOM or SAX. Using SimpleXML you can read, write or iterate over a XML file and access it's elements and attributes.

Whilst there are free online sitemap generator tools available on the Internet that allow you to create an XML sitemap which can be submitted to Google sitemaps. In order to better demonstrate the SimpleXML extension to you, we will do something useful and create a PHP function that will parse and prepend new entries dynamicly to a web sites Google sitemap.

He gets right down to it, illustrating what a sitemap looks like followed by a simple sample script to create it for that data. SimpleXML makes it a snap to generate the properly formatted XML and split it back out for Google's bots to consume.

0 comments voice your opinion now!
google sitemap simplexml php5 path tutorial google sitemap simplexml php5 path tutorial


blog comments powered by Disqus

Similar Posts

Vinu Thomas' Blog: Create a Storage engine for MySQL using PHP

The Bakery: Basic User Authentication in (CakePHP) 1.2.x

Sameer Borate: Downloading Gmail attachments in PHP an update

Max Horvath's Blog: How to enable the Xdebug debugger in Zend Studio for Eclipse

PHPBuilder.com: Customize Your WordPress Blog with PHP Plugins and Widgets


Community Events

Don't see your event here?
Let us know!


podcast version interview php7 community library voicesoftheelephpant laravel series release opinion framework introduction api unittest laravel5 example security video language

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework