How do I prevent direct access/download to mp3/wav files while allowing a flash player to access them with .htaccess (or PHP)? I\'ve been looking for a solution with only pa
Since PHP is available, use it to protect the files. Don't have them in them in the web root, but somewhere that is accessible to PHP. Then generate a one-time-use URL like:
Then store that unique value in the session/server/db and have another page validate the unique string prior to streaming the file:
Stream Me
Be sure to expire that unique token after the first use (or maybe after a few times if you are feeling generous). It won't stop the die-hards from capturing the HTTP stream anyway, but it should prevent casual linking.