PHP Classes

File: rss.php

Recommend this page to a friend!
  Classes of Paulius Lescinskas  >  Easy RSS  >  rss.php  >  Download  
File: rss.php
Role: Example script
Content type: text/plain
Description: Example and usage directives
Class: Easy RSS
Parse or create XML RSS feeds
Author: By
Last change:
Date: 13 years ago
Size: 1,550 bytes


Class file image Download

$rss = new easyRSS;

// Check out these two examples to find out how it works:
// 1st example:
$a = $rss->parse(implode(file("./rss.xml")), "Y-m-d H:i:s"); // If the second parameter is undefined, the unix timestamp will be returned instead of the string returned by php's date() function

// 2nd example
$rss_array = array(
"title"=>"My blog", // This field is mandatory
"description"=>"I am using EasyRSS to create this shit", // This field is mandatory
"link"=>"", // This field is mandatory
"title"=>"My first blog", // This field is mandatory
"description"=>"Hello! This is my first time using EasyRSS", // This field is mandatory
"title"=>"Exceptions of using XSL stylesheet", // This field is mandatory
"description"=>"When using XSL stylesheet, remember that Mozilla does not parse HTML tags. Though IE6 accepts HTML <b>tags</b> and parses them, Mozilla does not (and will never do). So using disable-output-escaping=&quot;yes&quot; parameter in &lt;xsl:text&gt; and &lt;xsl:value-of&gt; would be effective in MSIE only.", // This field is mandatory
"pubDate"=>1093387161, // pubDate MUST BE the unix timestamp
header("Content-type: application/xml");
$rss->rss($rss_array, "rss.xsl"); // Second parameter is not required