CodeIgniter Forums
How to protect files against direct download ? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: How to protect files against direct download ? (/thread-28826.html)



How to protect files against direct download ? - El Forum - 03-22-2010

[eluser]Unknown[/eluser]
I wan to protect my .swf files against direct download.
I wan them to be viewed on my website but nobody should access them directly.

I tried .htaccess
Code:
SetEnvIfNoCase Referer "^http://www.phpvideotutoriale.com/" locally_linked=1
SetEnvIfNoCase Referer "^http://www.phpvideotutoriale.com$" locally_linked=1
SetEnvIfNoCase Referer "^http://phpvideotutoriale.com/" locally_linked=1
SetEnvIfNoCase Referer "^http://phpvideotutoriale.com$" locally_linked=1
SetEnvIfNoCase Referer "^$" locally_linked=1
<FilesMatch "\.(swf)$">
  Order Allow,Deny
  Allow from env=locally_linked
</FilesMatch>

and
Code:
deny from all
etc.

If I can't access files by using any option in .htaccess I can't see swf clip on page as well.
How to make clip to be loaded on my page and not downloaded directly ?

file name is comming from database and added to movie path. a bit of code from my site :
Code:
<div id="media">
            <div id="noUpdate">
                <p>The Camtasia Studio video content presented here requires JavaScript to be enabled and the  latest version of the Macromedia Flash Player. If you are you using a browser with JavaScript disabled please enable it now. Otherwise, please update your version of the free Flash Player by <a href="http://www.macromedia.com/go/getflashplayer">downloading here</a>. </p>
            </div>
        </div>
        [removed]
            // &lt;![CDATA[
            var so = new SWFObject( "/pliki/kursy_video/darmowe/php_mysql/inne_kursy_video_php/php_wyswietlanie_tekstu_w_przegladarce.swf", "csSWF", "1280", "1042", "9.0.28", "#1a1a1a");
            so.addParam( "quality", "best" );
            so.addParam( "allowFullScreen", "true" );
            so.addParam( "scale", "showall" );
            so.addParam( "allowScriptAccess", "always" );
            so.addVariable( "autostart", "false" );
            so.write("media");            
            // ]]>
        [removed]

      
      
      
      <div class="clr"></div>
    </div>


Please. Help. Thanks.


How to protect files against direct download ? - El Forum - 03-22-2010

[eluser]InsiteFX[/eluser]
There is no protection for that! as an example I can watch your video
online and record it using a video recorder.

Enjoy
InsiteFX


How to protect files against direct download ? - El Forum - 03-23-2010

[eluser]Unknown[/eluser]
how to hide path with in javascript ??
thanks