Example #1
0
/**
RSS Feed Structure:

<channel>
	...
	<item>
		<title> </title>
		<link> </link> 
		...
	</item>
 </channel> 
*/
$source = $_GET['source'];
$rss = new RSS($source);
$rss->getLatest();
class RSS
{
    /**
     * the cache directory where we are saving our feeds output
     */
    private $cache_dir = 'cache';
    /**
     * time in seconds that the feed will be cached
     */
    private $cache_lifetime = 300;
    /**
     * the variable passed with AJAX, 
     * that holds the name of the blog we want to fetch the RSS
     */
    private $source;