<?
ob_start();
$slozka = dir("./blog");
$licha=true;
while($soubor=$slozka->read()) {
if ($soubor=="." || $soubor=="..") continue;
$barva = $licha ? "#FDF5E6" : "#FFFFFF"; // nebo
echo "<div style=\"background-color:$barva\">";
readfile ("./blog/".$soubor);
$datum=explode(".", basename($soubor));
echo "<p align=\"right\">".date("d.m.Y", strtotime($datum[0]))."</p>";
echo "<hr></div>";
$licha=!$licha;
}
$slozka->close();
$contents = ob_get_contents();
ob_end_clean();
header("Content-Description: File Transfer");
header("Content-Type: application/force-download");
header("Content-Disposition: attachment; filename=\"blog.gz\"");
echo gzencode($contents);
?>