Playing music (mp3s) from ../public_html

Hey everyone. I’m looking for a solution that will allow mp3s to play from a private directory below the public_html directory. For instance, all my mp3s are in the “/home/user/private/” directory while my web-files reside in “/home/user/public_html/”. The problem with this setup is that the client side needs a client path: “”, but since the “private” directory is below the “public_html” directory, the client-side cannot see those files.

Programmically, I can get a directory listing using PHP and display all the files and I could create a script that will show a pop-up download box for private files so people can download them, but I cannot play/embed them.

Any sort of solution that would prevent users from downloading files but allow those files to play or be embedded would be great.

If anyone knows of a solution, please let me know!

Thanks in advance.


Leave a Reply

Your email address will not be published. Required fields are marked *