Portal Home > Knowledgebase > Articles Database > Prevent flash from cache? Direct stream?


Prevent flash from cache? Direct stream?




Posted by firehawk1010, 01-31-2012, 09:13 AM
Question: if we have a custom flash player, and it plays a file from a specified url - is there a way we can prevent it from caching locally? we need to prevent any files being cached locally in addition for 3rd party players like realplayer....to download/intercept the audio file and start downloading it behind the scenes. thoughts?

Posted by fortunahost, 01-31-2012, 04:20 PM
You need to call your urls in flash using an random value like getURL('httP://www.myserver.com?randomkey='+Math.Random());

Posted by fortunahost, 01-31-2012, 04:22 PM
You can disable files from being get is almost impossible but you can make the person has some hard work doing it, first you need to make PHP send no cache headers, then you need to set an variable at database, after file at php is loaded you unset this variable, when the player or other thing tries to access the URL again, this variable will be false, so you will not send the file to it.

Posted by firehawk1010, 01-31-2012, 08:32 PM
im using ASP.NET I generate a random XML File and give flash some params of where the file is, it reads it which contains the audio file link. the client then (even in view source) wont know where the xml file is nor where the audio file is but the way they can gain access to it is by realplayer or some other media players that can detect the stream.

Posted by fortunahost, 01-31-2012, 08:38 PM
I think if you detect the headers then you can block realplayer or other players ,like IF headers == RealPlayer then exit script IF headers == HTTP continue I don't know how to do this in ASp.net trough

Posted by firehawk1010, 01-31-2012, 08:41 PM
but the question here is, there is no server side entry point here. it is directly that realplayer finds and downloads the media on the server

Posted by fortunahost, 02-01-2012, 04:39 PM
Then i think you can only use .htaccess to block files or some plugin for IIS



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
CMS Help (Views: 501)