David Culp <[EMAIL PROTECTED]> said:
> I had looked into that when I wrote Aero-Matic, but I couldn't find a method
> in PHP to make the server change the mime type without adding some mime-type
> code to the output, which FlightGear would then not be able to parse.
>
> I was learning PHP as I went along, so I may have missed something. What I
> would need to do is have the script communicate directly to the server,
> rather than through the document it's writing. Although I don't see how the
> browser would gain knowledge of the mime type unless it's contained in the
> document.
>
> I know document delivery is a weak link in Aero-Matic. An alternative is to
> email the output, but that's too slow. Another is to make Aero-Matic into a
> client-side app, and not have to deal with http. Another is to keep a
> database of browsers and settings that play nice .
>
In php you probably should fill the variable $buffer with the output and then
add these commands:
header ("Content-type: text/plain");
header ("Content-Length: " . strlen($buffer));
echo $buffer;
Alternatively you could try just putting the "Content-type" header in just
before you start your print statements. The header() function sends http
headers to the server and they wouldn't show in the output.
Best,
Jim
_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel