<?php
header("Content-Type: text/css");
ob_start("ob_gzhandler");
$files = explode(',', 'reset,typo,style');
$css = '';
foreach ($files as $file) {
$css .= "/* File: $file.css */\n";
if ($_SERVER['HTTP_HOST'] == 'webserver') {
$css .= '@import url("'.$file.'.css");';
} else {
$css .= file_get_contents($file . '.css');
}
$css .= "\n\n";
}
$etag = md5($css);
header('ETag: '.$etag);
if (isset($_SERVER['HTTP_IF_NONE_MATCH']) && trim($_SERVER['HTTP_IF_NONE_MATCH']) == $etag) {
header("HTTP/1.1 304 Not Modified");
die();
}
echo $css;
?>