Streaming an MP3 on stdout to Jplayer using PHP

后端 未结 3 462
-上瘾入骨i
-上瘾入骨i 2021-01-23 14:54

I\'m initializing jplayer with the following parameters:

$jplayer.jPlayer(\'setMedia\',{
  mp3: data.audioMP3,
  oga: data.audioOGA
});

Assume

3条回答
  •  佛祖请我去吃肉
    2021-01-23 15:17

    Since you are using javascript to get the file, others can do the same by reading the headers/file requests from the browser (firebug, Chrome's default tools, etc).

    The best way to protect your files from being downloaded is to make a series of checks to get at the data. It's not perfect, but it will deter all but the most determined. For some ideas, check out this page on Grooveshark's API (This is a bit old and some info is missing, so it's the perfect reference), or just visit Grooveshark/Youtube and see how they protect their content.

    It is possible to recreate this kind of security with some clever usage of sessions and a good database.

提交回复
热议问题