View Single Post
Old 03-16-2012, 02:02 PM  
rweb
Registered User
 
Industry Role:
Join Date: Feb 2012
Posts: 24
Sorry, I made a mistake.
PHP Code:
rand(0,sizeof($myfeeds)-1
should be actually
PHP Code:
$myfeeds[rand(0,sizeof($myfeeds)-1)] 
The include line like that
PHP Code:
include 'URL OF RSS2HTML FILE?XMLFILE='.$XMLfilename.'&TEMPLATE=URL OF TEMPLATE/sample-template.html&MAXITEMS=20'
may not work on all servers.

I tested on my server. I left the rss2html.php as it was. And in index.php I put:
PHP Code:
<?PHP
$myfeeds
[]='myfeedurl1';
$myfeeds[]='myfeedurl2';
$XMLFILE $myfeeds[rand(0,sizeof($myfeeds)-1)];
$TEMPLATE "sample-template.html";
$MAXITEMS "20";
include(
"rss2html.php");
?>
And it worked. (My index.php is in the same directory as the rss2html.php.)
rweb is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook