Results 1 to 9 of 9
Dec 17, 2006, 18:06 #1
- Join Date
- Dec 2006
- 0 Post(s)
- 0 Thread(s)
Using PHP to Hide the Location of MP3 Files While Streaming
One of my friends is a small time DJ that is just starting out but wants to enable anyone to find out about him, so, he started a small website and asked me to help him out. I suggested that he let people listen to a few select mixes he has done through a flash MP3 player. Since these songs will be the full deal (after all, everyone hates those little 30-second clips) we want to stream them through a flash media player so that people don't have to download the songs. In order to protect them, we want to place the files in a non-web-accessible directory and use a PHP file to refer to them.
We have a MP3 player all ready called "Dewplayer" (see the Google translated english version here) that we think will work well for it.
The normal code used to retrieve the songs is this (sorry some of it is in French):
<object type="application/x-shockwave-flash" data="dewplayer.swf? son=votre_son.mp3" width="200" height="20"> <param name="movie" value="dewplayer.swf? son=votre_son.mp3"/> </object>
<object type="application/x-shockwave-flash" data="dewplayer.swf? son=song.php?1" width="200" height="20"> <param name="movie" value="dewplayer.swf?son=song.php?1"/> </object>