Login   Register  
PHP Classes
elePHPant
Icontem

File: testefeed.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of José Carlos Valente  >  Feed Reader  >  testefeed.php  >  Download  
File: testefeed.php
Role: Example script
Content type: text/plain
Description: ficheiro teste
Class: Feed Reader
Parse and extract information from RSS 2.0 feeds
Author: By
Last change:
Date: 2004-08-18 03:46
Size: 1,183 bytes
 

Contents

Class file image Download
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>.: teste da classe feedReader :.</title>
</head>

<body>
<?php
include("feedReader.inc.php");
$ob=new feedReader();
$ob->setFeedUrl("webdevfeed.xml");
$ob->parseFeed();
$array=$ob->getFeedOutputData();
$number=$ob->getFeedNumberOfNodes();
echo 
"-- Channel --<br>";
echo 
$array["channel"]["title"]."<br>";
echo 
$array["channel"]["link"]."<br>";
echo 
$array["channel"]["description"]."<br>";
echo 
$array["channel"]["language"]."<br>";
echo 
$array["channel"]["copyright"]."<br>";
echo 
$array["channel"]["docs"]."<br>";
echo 
"<br>-- image --<br>";
echo 
$array["image"]["title"]."<br>";
echo 
$array["image"]["url"]."<br>";
echo 
$array["image"]["link"]."<br>";
echo 
"<br>-- items --<br>";
for(
$i=0;$i<$number;$i++){
    echo 
$array["item"]["title"][$i]."<br>";
    echo 
$array["item"]["link"][$i]."<br>";
    echo 
$array["item"]["description"][$i]."<br>";
    echo 
$array["item"]["author"][$i]."<br>";
    echo 
$array["item"]["pubdate"][$i]."<br>";
}
?>
</body>
</html>