Play mp3 but not able to download

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
aojha
Forum Newbie
Posts: 9
Joined: Wed Sep 10, 2008 6:35 am

Play mp3 but not able to download

Post by aojha »

Hi Guys,

If there is mp3 file I want user to play on my site but not able to download. Can some one help me to get sample code for that.

- Thanks
User avatar
omniuni
Forum Regular
Posts: 738
Joined: Tue Jul 15, 2008 10:50 pm
Location: Carolina, USA

Re: Play mp3 but not able to download

Post by omniuni »

First, you can investigate a file proxy. Take a look at this one:
http://www.finalwebsites.com/snippets.php?id=4

Now, that could still be downloaded, so you'll want to use a Flash-based mp3 player with some additional security so that your file proxy will only deliver to the Flash player, and not to an arbitrary source, like, say, your users download program. The purpose of the file proxy is so that a) your file proxy won't deliver the file at all unless certain conditions are met, and b) the folder containing the source file is then hidden and locked from the user.

Hope that helps!
Post Reply