Login   Register  
PHP Classes
elePHPant
Icontem

File: test.phtml

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of CDI  >  PHP-RSS-0.91  >  test.phtml  >  Download  
File: test.phtml
Role: ???
Content type: text/plain
Description: Demo usage
Class: PHP-RSS-0.91
Author: By
Last change:
Date: 2001-06-11 22:23
Size: 606 bytes
 

Contents

Class file image Download
<?php
header("Content-type: text/plain");

// Choose a file to parse
// $file = 'fm.rdf';    // Parse a freshmeat.net RSS file
$file = 'technology.rss';       // iSyndicate RSS

$data = implode("",file($file));

include("class.RSS.php");
$rss = new RSS ($data);
$allItems = $rss->getAllItems();
$itemCount = count($allItems);

for($y=0;$y<$itemCount;$y++)
{
        print "\nItem [$y] has data\n";
        print "[$y]: Title: " . $allItems[$y]['TITLE'];
        print "\n[$y]: Link : " . $allItems[$y]['LINK'];
        print "\n[$y]: Desc : " . $allItems[$y]['DESCRIPTION'];
}    
?>