I am making an online streaming website where users can listen to audio or video files. Currently I am calling an mp3 file in an audio tag using below code.
<a href="www.domain.com/path-to-audio/file.mp3">Play</a>
In my website a user can stream a song but cannot download it. DOWNLOADS ARE PAID. Above code is the worst thing to stream an audio file because when a user copies and pastes the above link on his browser, the song will be downloaded.
How can I securely stream the file without URL download option(user cannot copy the song url and download it).
I am using CodeIgniter(PHP framework), so how can I restrict a user to download the file directly.