Prefix the script filename with "nph-" to tell the webserver that the script is running as "non-parsed headers" (which is what nph stands for). Be aware that MSIE doesn't deal with non-parsed header scripts correctly, and will invariably not display the content until it is finished processing. I think that is an ongoing thing and as yet (MSIE5) hasn't been addressed.
To "con" the user into thinking the script is running as non-parsed headers, i.e. feeding information to them as you're processing, use multiple scripts or multiple calls to the same script, passing the information to the script(s) via META refresh tags.
adam