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!
People can still look at the source and find the file...
The MP3's in question are stored in a directory that apache gives restricted access to. PHP has to readline it from that directory to the listener's audio player.
I just now saved that whole mp3 file - 8.07 MB - servo.hatred
anything that reaches client side can be saved on his computer... it can be mp3, flash, video, audio, css, virtually any thing that is served to client. you can make the job tough but not impossible...
in this case i'd suggest a flash player for your mp3.. just to harden the case...
header('Content-Type: audio/mpeg');
header("Content-Disposition: attachment; filename=$newfilename");//this line allows the save!
readfile("$filepath");
loose the content disposition header
When Internet Explorer receives the header, it raises a File Download dialog box whose file name box is automatically populated with the file name that is specified in the header. (Note that this is by design; there is no way to use this feature to save a document to the user's computer without prompting him or her for a save location.)
n00b Saibot wrote:I just now saved that whole mp3 file - 8.07 MB - servo.hatred
anything that reaches client side can be saved on his computer... it can be mp3, flash, video, audio, css, virtually any thing that is served to client. you can make the job tough but not impossible...
in this case i'd suggest a flash player for your mp3.. just to harden the case...
Even still, doesn't the flash player code contain the path of the MP3?
Bigun, If you need to send it to the client... the client can save the file... the only (possible) way to prevent it would be embedding the mp3 with some sort of (yuk!) DRM...
n00b Saibot wrote:I just now saved that whole mp3 file - 8.07 MB - servo.hatred
anything that reaches client side can be saved on his computer... it can be mp3, flash, video, audio, css, virtually any thing that is served to client. you can make the job tough but not impossible...
in this case i'd suggest a flash player for your mp3.. just to harden the case...
Even still, doesn't the flash player code contain the path of the MP3?
like I said... you can make the job tough but not impossible...