Quote:
Originally Posted by ghost I use the lastRSS download it from Last RSS - PHP RSS parser/reader the zip contains one file lastRSS.php upload this unchanged to your php enabled server.now go to the page you want to display feeds on and place the following code where you want to display the feed. Code: <?php
function ShowOneRSS($url) {
global $rss;
if ($rs = $rss->get($url)) {
echo '<h2><a href="'.$rs['link'].'">'.$rs['title']."</a></h2>\n";
echo $rs['description']."<br>\n";
echo "<ul>\n";
foreach ($rs['items'] as $item) {
echo '<li><a href="'.$item['link'].'" title="'.$item['description'].'">'.$item['title'].'</a></li>';
}
if ($rs['items_count'] <= 0) { echo "<li>Sorry, no items found in the RSS file :-(</li>"; }
echo "</ul>\n";
}
}
// ===
// include lastRSS
include "lastRSS.php";
// List of RSS URLs
$rss_left = array(
'http://www.rte.ie/rss/gaa.xml',
);
$rss_right = array(
'http://www.independent.ie/sport/hurling/rss'
);
// Create lastRSS object
$rss = new lastRSS;
// Set cache dir, cache interval and character encoding
$rss->cache_dir = 'cache';
$rss->cache_time = 14000; // (4hrs)
$rss->cp = '';
$rss->items_limit = 5;
// Show all rss files
echo '<table class="rss_section" cellpadding="5" border="0"><tr><td width="50%" valign="top">';
foreach ($rss_left as $url) ShowOneRSS($url);
echo '</td><td width="50%" valign="top">';
foreach ($rss_right as $url) ShowOneRSS($url);
echo '</td></tr></table>';
?>
save your page with a .php extension you should now have feeds
modify the above code to suit your needs i mean feeds .
JS marquee cant help you there ,
fire away with the above let us know how you get on.
Mick |
Thanks for your advice.
On which directory shall I install "ast
RSS-PHP
RSS parser"? On /var/www/my_webpage.index.html ? I'm running Ubuntu 7.04 server amd64. This is a test. I have only a single page my_webpage.index.html
On where shall I copy your code? <body>your code</body>? If saving the webpage as .php NOT .html can visitor evokes it on browsing my site? Thanks
B.R.
satimis