Ty mu musíš hodiť aj obsah, nestačí mu poslať hlavičku, že sa to volá temp.html. Teda ak som si správne domyslel, že tam bude problém.
Kód:
@header("Cache-Control: ");
@header("Pragma: ");
@header("Content-type: text/html");
@header("Content-Disposition: attachment; filename=\"temp.html\"");
readfile("temp.html");