Viewing Source of Example: rss
<?php
/*
* RSS Example
*
* This example shows how easy it is to create syndicated content for use in
* another web site or portal.
*/
// construct an rss data structure
// this would be from a database or other resource in reality
$rss = array (
'title' => 'My RSS Feed',
'link' => site_url (),
'description' => 'A demonstration of an RSS news feed.',
'items' => array (
array (
'title' => 'Test Item 1',
'link' => site_url () . site_prefix () . '/index/nonexistantitem1',
),
array (
'title' => 'Test Item 2',
'link' => site_url () . site_prefix () . '/index/nonexistantitem2',
),
array (
'title' => 'Test Item 3',
'link' => site_url () . site_prefix () . '/index/nonexistantitem3',
),
),
);
echo template_simple ('rss.spt', $rss);
exit;
?>
Back