Forum: Q & A

Thread: How to protect files for downloading

back to threads list | this thread is closed
Search the forums:
Author  Message 
fiero

Posts: 258
Location: La Rioja, Spain
Registered: 6 Jul 2005
How to protect files for downloading
Posted: 23 May 2008 at 8:58 GMT
updated: 23 May 2008 at 9:04 GMT
Hi all,

Long time ago I tested a way to protect pano files for downloading here www.panoguide.com/forums/qna/2956/ . But this solution was incomplete.

Now, I updated this example with a definitive solution www.devalvr.com/protectdownload/ . The mov files can't be downloaded, but they can be seen with DevalVR. There is no change in html code, you can see the HTML pages in this example.

My example is hosting in a Linux server with Apache. To test, only download the files ".htaccess" and "request.php" ( www.devalvr.com/panos/protectdownload.zip ). In .htaccess file, change "devalvr.com" by your domain and then copy these two files in the folder where you have the panorama files.

Maybe this can be tested in IIS servers too. This is the code for .htaccess file:

RewriteEngine  on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?devalvr.com/.*$ [NC]
RewriteRule \.(mov|jpg|dvl|bmp)$ - [F]
RewriteRule (.*)\.(mov|jpg|dvl|bmp)$ request.php?file=$1.$2 [PT]


regards!
alert moderator
michael medina

Posts: 297
Location: portland, oregon, United States
Registered: 27 Jan 2008
Re: How to protect files for downloading
Posted: 23 May 2008 at 18:24 GMT
fiero, relying on referrers in htaccess is unreliable. there are many corporations and schools that block referrers. people who consciously block referrers don't count because they know why they do it so they can change it if the site isn't working for them.

i've given up on trying to protect my files as i would like them cached for the viewer in an effort to speed things up. if it's cached they can get it out of the cache. encryption may work, but i'm not sure how it works with caching. i think these guys (flashpanos.com/plugins/zephyr/hideapano-encryptio...) are onto it, but as you see there are still issues with their version too.
alert moderator
michael medina

Posts: 297
Location: portland, oregon, United States
Registered: 27 Jan 2008
Re: How to protect files for downloading
Posted: 23 May 2008 at 19:03 GMT
i just checked you example and i get a question mark instead of the movie working. i've done nothing to modify my referrer either.
alert moderator
canadian

Posts: 19
Location: United States
Registered: 11 Apr 2008
Re: How to protect files for downloading
Posted: 23 May 2008 at 19:11 GMT
I get the same question mark. No tour for me using FireFox.
alert moderator
fiero

Posts: 258
Location: La Rioja, Spain
Registered: 6 Jul 2005
Re: How to protect files for downloading
Posted: 23 May 2008 at 19:58 GMT
updated: 23 May 2008 at 20:03 GMT

michael medina said:

fiero, relying on referrers in htaccess is unreliable. there are many corporations and schools that block referrers. people who consciously block referrers don't count because they know why they do it so they can change it if the site isn't working for them.


I copied this code ( lines 2, 3 and 4) from web server examples that use it to prevent "hotlinking", this is to prevent that a user can show your files from another webpage. This code is very common on the Internet en.wikipedia.org/wiki/Inline_linking . Anyway these 3 lines can be removed and your MOV files could be seen from other pages, but not downloaded, so you could use this:
RewriteEngine  on
RewriteRule (.*)\.(mov|jpg|dvl|bmp)$ request.php?file=$1.$2 [PT]


If you see a "?" is because QT is launched to see the panoramas. I modified the examples (with detectvr.js) to use only DevalVR. Please, test now.

DevalVR do not use the standard Internet browser cache, so the files can't be get from cache. Of ourse, this method only can be used in Windows by now (because it does not work with QT).

regards!
alert moderator
michael medina

Posts: 297
Location: portland, oregon, United States
Registered: 27 Jan 2008
Re: How to protect files for downloading
Posted: 23 May 2008 at 21:37 GMT
updated: 23 May 2008 at 21:48 GMT
just because it's common doesn't make it right wink

seriously, if you rely on HTTP_REFERER, there are many many people who won't be able to view your panos. it is unreliable but it is the closest you can get without encryption, you just have to decide what is more important, people seeing your stuff or people stealing your stuff.

anything of real commercial value, i don't put on my site until i am paid for it (if ever wink).
alert moderator
John Houghton

Posts: 2317
Location: Hitchin, United Kingdom
Registered: 17 Jan 2005
Re: How to protect files for downloading
Posted: 24 May 2008 at 7:22 GMT
It's not difficult to take a series of screenshots of the spherical display and stitch them together into a QTVR file. Not exactly the same as the original, of course, but near enough for many purposes.

John
alert moderator
Smooth

Posts: 1472
Location: Australia
Registered: 21 Jul 2004
Re: How to protect files for downloading
Posted: 24 May 2008 at 8:53 GMT
Good work Fiero smile

It is a good solution and will stop the 99%er's from stealing your work.

Much appreciated.

Regards, Smooth cool
www.smooth360.com
alert moderator