I have a web site with some php scripts
that generates the xml files for Rss.

These scripts gen the xml file only if the current xml file is older than n seconds.. 4 caching...

how do u suggest to run those scripts silently?

i thought to include those files inside the homepage script so that are the user calling the scripts and updating the rss...

what you suggest?

    I would say just point the RSS feed(s) to the PHP script itself, so that every time the RSS feed is called/read, your PHP script can check a local .xml file to see if it has been updated within the last 'n' seconds and, if so, simply [man]readfile/man it out to the stream. If not, generate the new .xml file first.

      a month later
      bradgrafelman;10964806 wrote:

      I would say just point the RSS feed(s) to the PHP script itself, so that every time the RSS feed is called/read, your PHP script can check a local .xml file to see if it has been updated within the last 'n' seconds and, if so, simply [man]readfile/man it out to the stream. If not, generate the new .xml file first.

      i tryed to do what you say:

      $doc = new DOMDocument();
      if($doc->load( 'http://www.mysite.com/rss/news.latest.php' ){
      //parse code here....
      }

      this on my intranet apache server is working....

      on the apache webserver I have onlyne the load func returns always false.....

      i also tryed accessing by relative path , absolute /sitefolder/rss/news.latest.php
      and also with $_SERVER['DOCUMENT_ROOT'].'/sitefolder/rss/news.latest.php

      none of these working...

        Write a Reply...