<?php

$top='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html><head><title></title><meta http-equiv="content-type"
content="text/html; charset=UTF-8"/>
</head><body><div>';

$bottom='</div><p>
<a href="http://validator.w3.org/check?uri=referer">
<img style="border: 0pt" src="/valid-xhtml10.png"
     alt="Valid XHTML 1.0!" height="31" width="88" />
</a></p></body></html>';

// has to be done before any print
session_start();
$current=mktime();
if($_SESSION[last_click]) {
  $passed=$current-$_SESSION[last_click];
  $to_print.="$passed seconds have passed since your last visit.\n";
  $_SESSION[last_click]=$current;
}
else {
  $to_print="This is your first visit.\n";
  $_SESSION[last_click]=$current;
}

// print all in one go
print "$top\n$to_print\n$bottom";


?>

Valid XHTML 1.0!