PHP Classes

File: test.php

Recommend this page to a friend!
  Classes of Marylly   RSS Feed   test.php   Download  
File: test.php
Role: Example script
Content type: text/plain
Description: Test Page
Class: RSS Feed
Generate RSS 2.0 feeds
Author: By
Last change: The script using the class to generate a rss feed in xml.
Date: 18 years ago
Size: 769 bytes
 

Contents

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

//My constructor
$rss = new RSS();
//The name o channel of new of my rss feed
$rss->setChannelTitle("My RSS Feed!");
//The link to the channel or site
$rss->setChannelLink("http://localhost/index.php");
//The channel description
$rss->setChannelDesc("This is only a test script");
//The channel language
$rss->setLanguage("en-us");
//The copyritht
$rss->setCopyRight("Copyleft - The Freedow is in our hands");

//the channel items, they are the news of your channel. it could be used with database data
$rss->setItemTitle('My first new! =]');
$rss->setItemLink("http://localhost/index.php");
$rss->setItemDesc('Item Description');
$rss->setDtPosted('2006-06-16');
echo
$rss->newRSS();
                                       
                                       
?>