<?
/*
July 2004
RSS parser written in PHP5
by Tri Pham
(tri[at]tripham.nl)
http://www.tripham.nl/
*/
/******************** ONLY EDIT THIS ********************/
$rss_file = "link_to_rss_file"; // URL to rss file
$max_headlines = 10; // How many headlines do you want?
/******************** ONLY EDIT THIS ********************/
// Initialize SimpleXML
$xml = simplexml_load_file($rss_file);
// $i is used for count
$i=0;
// Loop though
foreach($xml->item as $item) {
if($i == ($max_headlines)){
exit;
}
++$i;
// Display headlines and description
printf("<b><a href=%s>%s</a></b><br>", $item->link, $item->title);
if(trim($item->description) == '') {
// No description available
printf("Description: unknown<br><br>");
}
else {
printf("Description: %s<br><br>", $item->description);
}
}
?>
<?
/*
July 2004
RSS parser written in PHP5
by Tri Pham
(tri[at]tripham.nl)
http://www.tripham.nl/
*/
/******************** ONLY EDIT THIS ********************/
$rss_file="link_to_rss_file";// URL to rss file
$max_headlines=10;// How many headlines do you want?
/******************** ONLY EDIT THIS ********************/