header("Expires: Sat, 22 Dec 1979 05:30:00 GMT");
echo "This is some text for output.
";
if (!headers_sent($filename, $linenum)) {
header("Location: www.yoursite.com");
exit;
} else {
echo "Headers already sent in $filename on line $linenum.
";
echo "Headers sent are:
";
$headers = headers_list( );
foreach($headers as $header) {
echo "- $header
";
}
echo "
";
exit;
}
?>