1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

sitemap xml / php tool

Discussion in 'Google Sitemaps' started by fgs, Feb 5, 2006.

  1. #1
    hello dp members,

    is anyone aware how to write to an xml file using php. I have dozen sites with 1-5K pages, and would like to be able to run mysql queries on a php page that would populate the xml sitemap file.
    SEMrush
    Anybody know of a way to do this or where to find examples of the code?

    Thanks for any information

    Regards

    Vlad
     
    fgs, Feb 5, 2006 IP
    SEMrush
  2. TwisterMc

    TwisterMc Mac Guru

    Messages:
    972
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #2
    TwisterMc, Feb 5, 2006 IP
  3. fgs

    fgs Peon

    Messages:
    967
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thanks for the reply,
    but I am not looking for an application to write the code in, I am looking for an actual snippet of code, that I am assuming would be something similar to:

    sql = ...get the data of all the pages ...
    while (sql)
    {
    writeto sitemap.xml ("<title>$pagetitle</title> ..... the rest of sitemap content ... ")
    }

    again, if anyone could help I would really appreciate it!
     
    fgs, Feb 5, 2006 IP
  4. TwisterMc

    TwisterMc Mac Guru

    Messages:
    972
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #4
    TwisterMc, Feb 5, 2006 IP
  5. fgs

    fgs Peon

    Messages:
    967
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Thank you for the link,

    but it is not quiet what I am looking for that one is a crawler, and I would like to find out how to be able to write to an XML file with php manually.

    This crawler thing did not seem to work.

    Best regards

    vlad
     
    fgs, Feb 5, 2006 IP
  6. DareDevils

    DareDevils Active Member

    Messages:
    607
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    70
    #6
    you can use this one ;)
    http://www.softswot.com/sitemap/sitemapxml.php
    Code (markup):
    i hope will be good.
     
    DareDevils, Dec 15, 2008 IP