We have a Woocommerce website selling audio files. It must be viewed only for logged-in users who purchased, and should not be allowed to be downloaded. We have implemented this solution (PHP: How can I block direct URL access to a file, but still allow it to be downloaded by logged in users?) of 'Victor' and it works fine to hide the exact file path, but it is downloading the file when we visit the link such as e.g. http://thesite.com/members/get_song.php?name=my-song-name. How can we make it to disable downloads of the file when visiting the link?
Asked
Active
Viewed 270 times
0
-
Chuck the files outside the docroot and have a PHP/JS filemanager (and/or audio player). – CD001 Mar 26 '19 at 11:48
-
Making audio files play, but not downloadable, seems the difficult bit to me. You can never protect it completely, but you can make it very difficult. Have a look at this intro: https://www.html5rocks.com/en/tutorials/webaudio/intro PS: I wouldn't call this 'puchased' music however, it is more like a subscription. – KIKO Software Mar 26 '19 at 12:03
-
To underline how difficult it can be, to protect your content, take [SoundCloud](https://soundcloud.com/go#feature-chart). That's also a subscription service. Yet it is still easy to find ways to download its content: https://www.lifewire.com/how-to-download-from-soundcloud-4570907 – KIKO Software Mar 26 '19 at 12:10
-
And by the way, if someone want the sound or file, he can use a program to record the played sound on your website. So in this case I would add a beep in every audio file every 10 seconds or so. In the bought version the beep is removed. Just to think about... – Mr. Jo Mar 26 '19 at 12:45