in reply to how to force HTML to display as text

print "Content-type:text/plain\n\n";
should work. However, some versions of Internet Explorer do try and be clever and might recognise a HTML file as such even with the text/plain mimetype header. It is a bug in Internet Explorer (and, in fact, can be exploited), but I don't think Microsoft is willing to do anything about it.