If you open the file by requesting it from the browser, then yes you will get headers.
You could get your flash thing to start reading the data and not actually interpret any lines untill it reads a line like "data starts here",
which could be the first "real" data that the PHP scripts writes after sending the headers.
Or like you suggested yourself, get flash to call a php page through the server, not execute a php script. The php page would generate a file that flash can open. But, what if your flash runs two instances at the same time....