@Byron Whitlock
, . MagPie. rss2html.php, HTML- RSS fetch, HTML-, . include ( "rss2html.php" ), HTML. RSS HTML. :
<?php
$hashfromURL = hash("md5",$url);
$cachefile = "cache/rss/".$hashfromURL.".html";
$cachetime = 5*60;
if(file_exists($cachefile) && (time() - filemtime($cachefile) < $cachetime ))
{
include($cachefile);
echo "RSS ucitan iz kesha!";
}
else{
$XMLfilename = $url;
ob_start();
include("rss2html.php");
$fp = fopen($cachefile, 'w');
fwrite($fp, ob_get_contents());
fclose($fp);
ob_end_flush();
echo "RSS osvjezen - feed ponovo ucitan!";
}
?>
source
share