XML Sitemaps Generator

Author Topic: Not reading links created with php script  (Read 8310 times)

Joe24

  • Registered Customer
  • Approved member
  • *
  • Posts: 6
Not reading links created with php script
« on: April 26, 2011, 08:18:32 PM »
I have a page that uses php script to create a list of links from files in a folder.  When a visitor opens the page the list of links automatically generates for the user to see.  The generator is not adding those links to the sitemap. 

The visitor can see and click the links.  Cant the generator read the page with links created with a php script?

XML-Sitemaps Support

  • Administrator
  • Hero Member
  • *****
  • Posts: 10623
Re: Not reading links created with php script
« Reply #1 on: April 27, 2011, 07:16:57 AM »
Hello,

yes, there should be no issues with that. WHat is the URL to that page?
Oleg Ignatiuk
www.xml-sitemaps.com
Send me a Private Message

For maximum exposure and traffic for your web site check out our additional SEO Services.

Joe24

  • Registered Customer
  • Approved member
  • *
  • Posts: 6
Re: Not reading links created with php script
« Reply #2 on: April 27, 2011, 03:30:42 PM »
Yes, I was able to make a change with the PHP code I am using on the page with links.  Now the generator is picking up the urls.  I think it’s because I added a <br> in the PHP code.  The time it takes to place the code on the page is acceptable. 

Now whenever I drop a new page in a folder the content page automatically picks it up for crawling.

1.   I created a “Site Content” page
2.   Changed the extension from .html to .php
3.   Added the code below to list all the urls from a folder on the page

<?php
if ($handle = opendir("budget-database")) {
    while (false !== ($file = readdir($handle))) {
        if ($file != "." && $file != "..") {
            echo "<a href=\"[external links are visible to admins only]...com/budget-database/".$file."\">".$file."</a><br>";
        }
    }
    closedir($handle);
}
?>

I appreciate your help!

 

SMF 2.0.12 | SMF © 2014, Simple Machines
XHTML RSS WAP2