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.

Can I use PHP sitemap

Discussion in 'Google Sitemaps' started by PinoyIto, Sep 10, 2006.

  1. #1
    I am using a php script to create it my sitemap, can I use this .php file as my site map in google?
     
    PinoyIto, Sep 10, 2006 IP
  2. ablaye

    ablaye Well-Known Member

    Messages:
    4,024
    Likes Received:
    97
    Best Answers:
    0
    Trophy Points:
    150
    #2
    the sitemap i believe must be xml.
     
    ablaye, Sep 10, 2006 IP
  3. billybrag

    billybrag Peon

    Messages:
    324
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #3
    what script are you using?
     
    billybrag, Sep 10, 2006 IP
  4. PinoyIto

    PinoyIto Notable Member

    Messages:
    5,863
    Likes Received:
    170
    Best Answers:
    0
    Trophy Points:
    260
    #4
    I am using php to create linsk to all pages of my site, is there a script to covert the url I created into xml format?
     
    PinoyIto, Sep 11, 2006 IP
  5. websitetools

    websitetools Well-Known Member

    Messages:
    1,513
    Likes Received:
    25
    Best Answers:
    4
    Trophy Points:
    170
    #5
    If it is your own script, then why not have it generate an XML file instead? I believe there is a PHP XML sitemap generator script out there. Try Google.
     
    websitetools, Sep 11, 2006 IP
  6. extreme101

    extreme101 Peon

    Messages:
    81
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #6
    doesnt google provide a ssitemap tool which creates one for you?
     
    extreme101, Sep 11, 2006 IP
  7. hubel

    hubel Grunt

    Messages:
    382
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    168
    #7
    Yes, but only if your server supports Python
     
    hubel, Sep 11, 2006 IP
  8. PinoyIto

    PinoyIto Notable Member

    Messages:
    5,863
    Likes Received:
    170
    Best Answers:
    0
    Trophy Points:
    260
    #8
    Yes it's my script, but the problem I don't know how convert the output into xml format.
     
    PinoyIto, Sep 11, 2006 IP
  9. Pat Gael

    Pat Gael Banned

    Messages:
    1,331
    Likes Received:
    68
    Best Answers:
    0
    Trophy Points:
    0
    #9
    There is an online service creating sitemaps (up to 5 websites for free) and pinging google after crawling for immediate submission:

    
    
    http://www.freesitemapgenerator.com
    
    Code (markup):
     
    Pat Gael, Sep 11, 2006 IP
  10. menerweb

    menerweb Well-Known Member

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    101
    #10
    I think this is the best:

    http://www.xml-sitemaps.com/
     
    menerweb, Sep 12, 2006 IP
  11. WoodiE55

    WoodiE55 Well-Known Member

    Messages:
    193
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    125
    #11
    Google won't read the sitemap in a .php form only .xml form. Check out HotScripts.com - there are a ton of Google sitemap generators out there!
     
    WoodiE55, Sep 14, 2006 IP
  12. Mwb2k

    Mwb2k Peon

    Messages:
    92
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Yeah offcourse u can use a PHP page as a google sitemap. Only make sure that the page that u create, is has a XML header.
    Example:
    
    header('Content-Type: application/xml');
    echo '<urlset xmlns="http://www.google.com/schemas/sitemap/0.84">';
    
    ... your url's ...
    
    echo '</urlset>';
    
    Code (markup):
    Pretty easy. I do it too.
     
    Mwb2k, Sep 14, 2006 IP
  13. PinoyIto

    PinoyIto Notable Member

    Messages:
    5,863
    Likes Received:
    170
    Best Answers:
    0
    Trophy Points:
    260
    #13
    Wow this is cool I will try it and will update you if it works
     
    PinoyIto, Sep 14, 2006 IP
  14. damiangoogle

    damiangoogle Active Member

    Messages:
    296
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #14
    PHP sitemap, yeah, i use it
     
    damiangoogle, Sep 15, 2006 IP
  15. damiangoogle

    damiangoogle Active Member

    Messages:
    296
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #15
    But firstly I have some problem
     
    damiangoogle, Sep 15, 2006 IP
  16. The Webmaster

    The Webmaster IdeasOfOne

    Messages:
    9,516
    Likes Received:
    718
    Best Answers:
    0
    Trophy Points:
    360
    #16
    Making an XML sitemap file -


    $copy_text = '<?xml version="1.0" encoding="UTF-8"?>\n
                                 <!--Google Site Map -->\n
                                 <urlset xmlns="http://www.google.com/schemas/sitemap/0.84">\n
                                  ... your urls ...
                                 </urlset>';
    $FileName = "sitemap.xml";
    $fh = fopen($FileName, 'w+') or die("can't open file");
    fwrite($fh, $copy_text);
    fclose($fh);
    Code (markup):
     
    The Webmaster, Sep 18, 2006 IP
  17. notcon.seo

    notcon.seo Guest

    Messages:
    44
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #17
    Well not strictly true, you can have an asp or php file that dynamically generates your xml sitemap, I have developed numerous dynamically driven sitemap files for blog and ecommerce sites. You just have to make sure that the information is outputted in xml, so for an asp sitemap it may look like the following:

    <?xml version="1.0" encoding="ISO-8859-1"?>
    <%
    Response.Buffer = true
    Response.ContentType = "text/xml"
    %>
    <?xml-stylesheet type="text/xsl" href="web-blog/include/sitemapcss.xsl"?>
    <urlset xmlns="http://www.google.com/schemas/sitemap/0.84"
    	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    	xsi:schemaLocation="http://www.google.com/schemas/sitemap/0.84
    	http://www.google.com/schemas/sitemap/0.84/sitemap.xsd">
    <url>
      <loc>link</loc>
      <lastmod><%= year(Date()) & "-" & strCurMonth & "-" & strCurDay %></lastmod>
      <changefreq>monthly</changefreq>
      <priority>1</priority>
    </url>
    <%
    Do While Not rsBlog.EOF
    %>
    <url>
      <loc><% Response.Write("link")%></loc>
      <lastmod><%= year(rsBlog("blog_releaseDate")) & "-" & strBlogMonth & "-" & strBlogDay %></lastmod>
      <changefreq>monthly</changefreq>
      <priority>.5</priority>
    </url>
    <%
    rsBlog.MoveNext
    Loop
    %>
    </urlset>
    Code (markup):
    Sorry I know that probably wont help you all that much if your after php, but I aint a php programmer.
     
    notcon.seo, Sep 19, 2006 IP