Wouldn't be that difficult, use the html include for the header, include a php file, in that php file simply do what your script does, but in PHP/HTML:
<?php
$hr = date("H");
$min = date("i");
if($hr == 00) {
$color = "#00FF00";
$message = "It's Midnight!";
} elseif($hr == 02) {
$color = "#FF0000";
$message = "It's two AM!";
} else {
$color = "#FFFFFF";
$message = "";
}
echo("<div style=\"background-color: ". $color .";\">". $message ."</div>\n");
?>