Disable Download

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
godlike99
Forum Newbie
Posts: 3
Joined: Fri Feb 03, 2006 1:22 pm

Disable Download

Post by godlike99 »

I have a web site with a flash.
Is it possible to disable download for browser of my flash file ?
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

Simple answer. No.

Anything that is displayed on your screen has already been downloaded onto your system..
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post by Burrito »

if you have a flash communications server, you could stream the flash down in which case the 'source' file would not be downloaded...
godlike99
Forum Newbie
Posts: 3
Joined: Fri Feb 03, 2006 1:22 pm

Post by godlike99 »

feyd | Please use

Code: Select all

and

Code: Select all

tags where appropriate when posting code. Read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]


I think I have found the solution.
By not displaying MyFile.swf, user should not be able to know the location of the Flash File.

Code: Select all

<p><object type="application/x-shockwave-flash" height="64" width="240" data="http://localhost/public_html/index.php/classdoclib/download/fhash=f665824ece0820d7d439fb14340d1180"><param value="http://localhost/public_html/index.php/classdoclib/download/fhash=f665824ece0820d7d439fb14340d1180" name="movie" /><param value="false" name="loop" /><param value="false" name="menu" /><param value="best" name="quality" /><param value="noscale" name="scale" /><param value="#CCCCCC" name="bgcolor" /><param value="" name="flashvars" /></object></p>

This maybe out of the topic... But hope someone can help

I am creating an eductional application using open source Logicampus.
By using Web Based WYSIWYG editor ( HTMLArea ), i can create Lesson Content.
There is a custom button called Embed Flash that should create all these code, but it doesn't work.

Any done this before ? Embed a flash inside the HTMLArea ?

Thanks in advance.


feyd | Please use

Code: Select all

and

Code: Select all

tags where appropriate when posting code. Read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Post by josh »

Using a hash in the URL will not stop anyone but the most novice users, even if that hash is good for only one download there are two ways to get around:

I can find the locally cached file
I can load the page from fopen() in PHP so I can view the source without having my browser download the page.
I'm sure there are other ways

Your best bet to make it run only off your domain is have it check for the existence of a file on your server using loadVariables, since flash only loads off the same domain it would only work on your site if you use a relative URL. Of course flash can still be decompiled. There is now way around that, you can fight it by making your code un-readable but ultimately you can't possibly stop me from getting into your actionscript
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

Ultimately the file is not safe, as swf (with the right tools) can be converted back to a semi decent .fla. Therefore, they would be able to override any domain checking or whatnot..

definantly will stop 99.9% of malicious users though :P
godlike99
Forum Newbie
Posts: 3
Joined: Fri Feb 03, 2006 1:22 pm

Post by godlike99 »

" it check for the existence of a file on your server using loadVariables, since flash only loads off the same domain it would only work on your site if you use a relative URL. "
What do you mean by this ? Can you further explain this ?

I try to paste the code in browser. 'http://localhost/public_html/index.php/ ... 14340d1180' . It allows me to download.
I think hashing the file still cannot solve my problems.

Any suggest ?
Post Reply