Posted by J.O. Aho on 11/17/07 19:26
nospam wrote:
> Thanks for all of the replies. I am interested in using the script
> as Aho mentioned. Duh, I sort of understand what you are saying,
> but need to clarify.
>
> This would be a server side script - like cgi?
> or client side - like javascript?
It has to be server side like php or any other scripting language.
<?PHP
$file="themp3file.mp3";
header('Content-type: application/octet-stream');
header('Content-Length: '. filesize($file));
header("Content-Disposition: attachment; filename='{$file}'");
readfile($file);
?>
For more info, you can check the header() function on the PHP online manual
http://www.php.net/manual/en/function.header.php
--
//Aho
Navigation:
[Reply to this message]
|