SitePoint Sponsor |
|
User Tag List
Results 1 to 5 of 5
-
Jun 14, 2006, 02:54 #1
- Join Date
- Aug 2005
- Posts
- 38
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Google Sitemap from Database possible?
Hello everyone,
I wonder is it possible to generate xml sitemap from database(mysql) so that my sitemap will be always updated.I have only one table that contain articles i like to generate xml sitemap from that table.Please suggest how it can be done.
-
Jun 14, 2006, 09:41 #2
- Join Date
- Jul 2005
- Location
- West Springfield, Massachusetts
- Posts
- 17,290
- Mentioned
- 198 Post(s)
- Tagged
- 3 Thread(s)
Is it possible? You bet.
Just use PHP's database functions to get the db results, format them to meet the DTD/Schema requirements, and then use PHP's file functions to write them to an XML file.
Big Change Coming Soon - if you want your PMs save them now!
What you need to do to prepare for our migration to Discourse
A New SitePoint Forum Experience: Our Move to Discourse
-
Jun 14, 2006, 11:49 #3
- Join Date
- Aug 2005
- Posts
- 38
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
thanks mittineaque with ur sugesstion iam able to output xml format in sitemap.php page..i want to know how to generate sitemap.xml from sitemap.php.Can you please.
-
Jun 14, 2006, 12:42 #4
- Join Date
- Feb 2003
- Location
- Slave I
- Posts
- 23,424
- Mentioned
- 2 Post(s)
- Tagged
- 1 Thread(s)
All you have to do is pull the data from the database and echo it out as xml. It's no different from echoing out HTML except that you have to follow Google's specified format for their sitemap. They have plenty of documentation about it on their website.
-
Jun 15, 2006, 23:00 #5
- Join Date
- Aug 2005
- Posts
- 38
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
thanks to all.. i successfully done my dynamic google sitemap and submitted to google.
Cheers
Bookmarks