Login   Register  
PHP Classes
elePHPant
Icontem

File: rss2.xml

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of mohammadjafar mashhadi  >  RSS 2 Feed maker  >  rss2.xml  >  Download  
File: rss2.xml
Role: Example script
Content type: text/plain
Description: only a sample
Class: RSS 2 Feed maker
Generate XML for RSS 2 feeds
Author: By
Last change: $rss->setinfo('language','en-US');
and
Tue, 13 Jul 2010 16:33:17
Date: 2010-08-17 18:13
Size: 702 bytes
 

Contents

Class file image Download
<?php
header
("Content-Type: application/atom+xml");
require 
'./rssfeed.class.php';

$rss = new RSSFeed();

$rss->setinfo('encoding','utf-8');
$rss->setinfo('title','RSS FEED TITLE');
$rss->setinfo('link','http://www.mysite.com/');
$rss->setinfo('description','RSS FEED EXAMPLE');
$rss->setinfo('language','en-US');
$rss->setinfo('lastbuilddate',date('D, d M Y H:i:s'));

$rss->addcontent(array(
    
'title' => 'content title',
    
'link' =>  'permalink',
    
'guid' =>  'sth like permalink',
    
'pubdate' => 'Tue, 13 Jul 2010 16:33:17',
    
'content' => 'Hello, This is a RSS FEED creator class.<br />RSSFeed class makes creating RSS VALID feeds easier'
));


$rss->renderfeed();

exit();
?>