SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast
    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.

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,146
    Mentioned
    190 Post(s)
    Tagged
    2 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.

  3. #3
    SitePoint Enthusiast
    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.

  4. #4
    He's No Good To Me Dead silver trophybronze trophy stymiee's Avatar
    Join Date
    Feb 2003
    Location
    Slave I
    Posts
    23,423
    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.

  5. #5
    SitePoint Enthusiast
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •