header ('Content-type: ??????????') for an unkown type

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

header ('Content-type: ??????????') for an unkown type

Post by Chris Corbyn »

Hi,

I'm using a header redirect to a polyphonic ringtone file with extension .mmf

What do I put in the

Code: Select all

<?php
header ('content-type: ');
?>
since if I put application/mmf or audio/mmf netscape just tries to save as .mmf.php but IE handles it fine.

I think there must be a way to say

Code: Select all

<?php
header ('content-type: Unkown/Unkown');
?>
If anyone knows what it is please let me know.

Thanks
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

Try ..
header('Content-Type: application/octet-stream');
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Just tried that but I get the same problem.

It might not be possible to prevent netscape acting like this with file types it has not been programmed to understand.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Well, if anyone can't come up with the answer to which content-type to use does anyone know of any other methods in PHP to redirect to a file and force download? You might not need to force download anyway with .mmf since it shouldn't open in the browser
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

It wasn't content-type that was my problem. I did need to use octet-stream but the answer was a bit stranger (silly netscape 7 thing) and was to do with the page that linked to download.php not download.php itself

See this post

viewtopic.php?t=20510&highlight=
Post Reply