3600 * $CACHETIME)) { if($feed_contents = http_get_contents($BLOGURL)) { // write feed contents to cache file $fp = fopen($CACHEFILE, 'w'); fwrite($fp, $feed_contents); fclose($fp); } } include "rssparser.php"; $rss_parser = new RSSParser($CACHEFILE); // read feed data from cache file $feeddata = $rss_parser->getRawOutput(); extract($feeddata['RSS']['CHANNEL'][0], EXTR_PREFIX_ALL, 'rss'); // display leading image if(isset($rss_IMAGE[0]) && $rss_IMAGE[0]) { extract($rss_IMAGE[0], EXTR_PREFIX_ALL, 'img'); echo "

    \"\"

    \n"; } // display feed title echo "

    "; echo htmlspecialchars($rss_TITLE); echo "

    \n"; // display feed items $count = 0; foreach($rss_ITEM as $itemdata) { echo "

    "; echo htmlspecialchars(stripslashes($itemdata['TITLE'])); echo "
    \n"; echo htmlspecialchars(stripslashes($itemdata['DESCRIPTION'])),"
    \n"; echo "",date($TIMEFORMAT, strtotime($itemdata['PUBDATE'])),"

    \n\n"; if(++$count >= $NUMITEMS) break; } // display copyright information echo "

    © {",htmlspecialchars($rss_COPYRIGHT),"}

    \n"; ?>
    '; echo $json{title}; echo " - "; echo $json{author}; echo '
    <'; echo $json{type}; echo ' src="'; echo $json{src}; echo '" href="'; echo $json{href}; echo '" width=100%>'; echo $json{body}; echo ''; echo ''; } ?>