PHP Classes

File: gFeed.test1.php

Recommend this page to a friend!
  Classes of Cesar D. Rodas   gFeed   gFeed.test1.php   Download  
File: gFeed.test1.php
Role: Example script
Content type: text/plain
Description: Test: how to open a Local RSS
Class: gFeed
Stream wrapper to read and write RSS feeds
Author: By
Last change:
Date: 17 years ago
Size: 889 bytes
 

Contents

Class file image Download
<?
include("gFeed.php");

$f = fopen("rss:///root/Desktop/cesar/phpclasses/phpclassesblog-xml","r");
/* Rewinding && reading the first line, which is the RSS information. */

rewind($f);
fread($f,1);


print
"<h1>${title}</h1>";

print
"<b>Link</b>: ${link}<br/>\r\n";

print
"<b>Description</b>: ${description}<br/>\r\n";

print
"<b>Generator</b>: ${generator}<br/>\r\n";

print
"<b>Lenguage</b>: ${language}<br/>\r\n";

print
"<br/>\r\n";

print
"<hr>\r\n";



while (
fread($f, 1) ) {
   
/*

     * After the first read (information of blog), comes

     * the RSS entries

     */

   
print "<b>Title</b>: ${title}<br/>\r\n";

    print
"<b>Link</b>: ${link}<br/>\r\n";

    print
"<b>Author</b>: ${author}<br/>\r\n";

    print
"<b>Date</b>: ${date}<br/>\r\n";

    print
"<b>Description</b>: ${description}<br/>\r\n";

    print
"<hr>\r\n";

}

fclose($f);

?>