PHP Classes

File: gFeed.test3.php

Recommend this page to a friend!
  Classes of Cesar D. Rodas   gFeed   gFeed.test3.php   Download  
File: gFeed.test3.php
Role: Example script
Content type: text/plain
Description: Test: how to write a Local RSS
Class: gFeed
Stream wrapper to read and write RSS feeds
Author: By
Last change: * making visible without user login
Date: 16 years ago
Size: 905 bytes
 

Contents

Class file image Download
<?
include("gFeed.php");
/*
 * Opening a local RSS for write a new one
 */
$f = fopen("rss://newRSS.xml","w");
/*
 * Do never forget that in the 0 position the channel information
 * is saved, but after that (from 1 to N) items are saved.
 */
   
$title="gFeed RSS test";

   
$link="http://cesars.users.phpclasses.org/gfeed";

   
$description="RSS IO stream wreaper class";

   
$date = date("Y-m-d H:i:s");
   
$language = "en";
   
fwrite($f,1);
   
/* Add a new Entry */
   
$title = "Test Entry N 1";
   
$link = "http://cesars.users.phpclasses.org/gfeed?test";
   
$author = "Cesar D. Rodas";
   
$date = '2007-07-24 14:17:00';
   
$description = "Test description";
   
fwrite($f,1);
   
$title = "Test Entry N 2";
   
$link = "http://cesars.users.phpclasses.org/gfeed?test";
   
$author = "Cesar D. Rodas";
   
$date = '2007-07-24 14:17:00';
   
$description = "Test description";
   
fwrite($f,1);
fclose($f);

?>