Hi there,
I have the following construct. Somebody uploads an mp3 file on a website and it will be stored via PHP somewhere in the file system. Let's say the mp3 is 30 seconds long. The user just uploads one version of the song (30 seconds)
Later I want to provide a 10 seconds preview of this file. This has to be totally secure, so the user can just listen to 10 seconds, not the 30 seconds full.
How can I do that? Is there a flash player which is able to just play the first 10 seconds of a song and how secure is that? Is there any other method with PHP or something else to reduce the song - I know it's really tricky and with PHP not really possible because PHP can't open/edit audio files.
How would a big music company do that?
Thanks a lot
mp3 - just first seconds
Started by DaQuark, Nov 03 2007 09:05 AM
2 replies to this topic
#1
Posted 03 November 2007 - 09:05 AM
|
|
|
#2
Posted 03 November 2007 - 12:36 PM
I found a guy who programmed a PHP MP3 class. This class is able to merge two songs and even extract a part from a mp3.
PHP MP3 Class @ SourceRally.net PHP Community
It says this class has a bug, hopefully is the bug not too big.
PHP MP3 Class @ SourceRally.net PHP Community
It says this class has a bug, hopefully is the bug not too big.
#3
Posted 03 November 2007 - 03:24 PM
I could be wrong, but any script that uses the 30 second mp3 to play a 10 second segment could possible be hacked to gain access to the fill 30 seconds.
If it is embedded in flash, you can use a flash decompiler - if it is stored anywhere in your public_html directory it can be found using a directory sniffer.
The most secure way would be to: when the song is uploaded, make another mp3 (which is the 10 second segment), you then could store the 30 second mp3 somewhere on your server, and the 10 second mp3 in your public directory.
It doesn't have to be this sequence per se, but I'm pretty confident in saying there is no 100% secure way to play "part" of a single mp3, without making that "part" a separate mp3.
If it is embedded in flash, you can use a flash decompiler - if it is stored anywhere in your public_html directory it can be found using a directory sniffer.
The most secure way would be to: when the song is uploaded, make another mp3 (which is the 10 second segment), you then could store the 30 second mp3 somewhere on your server, and the 10 second mp3 in your public directory.
It doesn't have to be this sequence per se, but I'm pretty confident in saying there is no 100% secure way to play "part" of a single mp3, without making that "part" a separate mp3.


Sign In
Create Account

Back to top









