Removing a web page after loading

I have a very specific set of needs and am looking for a library to fulfill them. Basically, I need to have audio playback on a webpage relatively fast. The trick here is that I don't want to allow the user to download audio at all. So the ideal behavior would be for my php script to generate a sound placed somewhere on my server and then serve up the html page. The location of the audio file will be provided by the audio player via the php variable. The cron job will run some time later and remove the old generated sound. Are there any good methods for doing this? I'm cheating on jPlayer, but I was wondering if anyone has any ideas for some solutions. The audio player will be closed to the user (just like a height element with a zero height width),so the look of the player is irrelevant to my needs.

Things I have considered:

1) Placing an audio file in a place inaccessible to the user. However, this could not work because then the audio player would not be able to access it from the client side.

2) Make the audio in a website accessible place, but it is very difficult to understand the code (everything in the code is not clear), so it will take a lot of work for the user to find the location of the audio file in HTML. A cron job could go through and delete old audio files within 5 minutes of creation.

I hope this all makes sense, if anyone needs some clarification I would be happy to provide it. I've just never had to work with audio on a web page before in a form like this, so of course thanks for your help and time!


I know it is impossible to make it impossible for a client to access audio. I just want to make it hard enough that regular users won't be able to do it. To prevent other people from abusing it, I am guessing that registration information will be needed, so any idea on this would be great as well.


source to share

2 answers

Ok, first of all, you can forget that you can hide the sound so that no one can get a copy of it. No matter what you do, you cannot prevent someone from grabbing it on the client side. In the worst case, tools like Fiddler (or the one built into your browser) keep it simple.

What I would do is your audio file from the script as you suggested, where the script requires the user to be logged in. Alternatively, just check the session variable you set in your page. The idea is to ensure that the user who downloads this file is actually on your page. This way, you can also limit the number of these audio files that the user actually downloads. Pandora and others use similar techniques.

Another thing you can do is use a watermark, so that if the audio file ends up somewhere on the Internet, you can trace it back to an individual user and follow it. Usually you use an API from some company for this, but if you want to make your own, you will need knowledge of DSP algorithms so that the resulting audio file will not have a watermark with which to detect the ear.



I think the best way to protect your audio / video from downloading is to use streaming. Some streams like realplayer or others were always the only thing I always had to download real problems with as there was no software for it. The situation could have changed, but this is unlikely.



All Articles