<?php
include_once './RssFeed.php';
include_once './RssItem.php';
$rss = new RssFeed();
$rss->title('サイトタイトル');
$rss->description('サイトの説明文です');
$rss->link('http://example.com/');
$rss->atomLink('http://example.com/rss.xml');
$item = new RssItem();
$item->title('記事1');
$item->description('ここに要約が入ります');
$item->link('http://example.com/1');
$item->guid('http://example.com/1');
$item->pubDate('2016-01-02 12:23:34');
$rss->addItem($item);
header('Content-type:application/rss+xml');
echo $rss->saveXML();
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>サイトタイトル</title>
<description><![CDATA[サイトの説明文です]]></description>
<link>http://example.com/</link>
<atom:link href="http://example.com/rss.xml" rel="self" type="application/rss+xml"/>
<item>
<title>記事1</title>
<description><![CDATA[ここに要約が入ります]]></description>
<link>http://example.com/1</link>
<guid isPermaLink="true">http://example.com/1</guid>
<pubDate>Sat, 02 Jan 2016 12:23:34 +0900</pubDate>
</item>
</channel>
</rss>