Only allow one file to access another
Posted: Mon Oct 12, 2009 2:06 pm
Ah, my first post back!
I've been trying to figure how to do this for several years now, and never managed to get a good solution. Let's say I want to provide an MP3 Player on a website. The MP3 player is flash, and takes the location of the MP3 as an argument. I want a PHP script that will take an MP3 in a protected directory (.htaccess) and deliver it ONLY to that MP3 player. What would be really awesome is if someone could point me to a solution where I would have an easy way to modify the script so that I could also use it to provide file access to people who are logged in to a system of some sort (although I found a script that kind of does that).
Is it possible to do this? Does anyone know where I can look to find out how, or can someone post some sample code?
Basically, I'm working on a website where they want the MP3's to be playable in full, but obviously, they won't want them simple to download; people should buy the CD! (*cough* like I can stop them from launching Audacity and recording the audio_out... *cough*)
Thank you all!
I've been trying to figure how to do this for several years now, and never managed to get a good solution. Let's say I want to provide an MP3 Player on a website. The MP3 player is flash, and takes the location of the MP3 as an argument. I want a PHP script that will take an MP3 in a protected directory (.htaccess) and deliver it ONLY to that MP3 player. What would be really awesome is if someone could point me to a solution where I would have an easy way to modify the script so that I could also use it to provide file access to people who are logged in to a system of some sort (although I found a script that kind of does that).
Is it possible to do this? Does anyone know where I can look to find out how, or can someone post some sample code?
Basically, I'm working on a website where they want the MP3's to be playable in full, but obviously, they won't want them simple to download; people should buy the CD! (*cough* like I can stop them from launching Audacity and recording the audio_out... *cough*)
Thank you all!