I am trying to make a script output some data as a file that is asked to download. This is how VB appears to do it (modified for my purpose)

PHP Code:
  header("Content-disposition: filename=download.txt");
  
header("Content-Length: ".strlen($download));
  
header("Content-type: unknown/unknown");
    
header("Pragma: no-cache");
    
header("Expires: 0");
  echo 
$download
but it does not seem to work. The results seem to depend on browser. Someone using IE4 said that $download just showed up in the browser and using NS6 they were asked to save the file that this php code appears in.

Nothing is being echoed before the code above.