Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > How do I prevent saving a file embeded into a web page?

How do I prevent saving a file embeded into a web page?
Thread Tools
Grizzled Veteran
Join Date: Aug 2002
Location: Cardboard Box
Status: Offline
Reply With Quote
Nov 22, 2003, 04:08 PM
 
I need to embed MP3s into a web page and prevent a user from saving them to a disk. I know how to do this for pictures using java script, but can it be adapted for this use? Thanks.
<Witty comment here>
www.healthwebit.com
     
Registered User
Join Date: Jul 2003
Location: San Jose
Status: Offline
Reply With Quote
Nov 22, 2003, 09:36 PM
 
you might try kioskmode...
[php]
<embed src="myTune.mp3" width="200" height="240" kioskmode="true">
[/php]

found here
     
Dedicated MacNNer
Join Date: Aug 2002
Status: Offline
Reply With Quote
Nov 22, 2003, 10:53 PM
 
the flaw is that the user still knows where the mp3 is, and they can then download it themselves.

the ways to make this harder for the user is by not putting the song in the html, but rather in a flash movie, or a java applet.

there is no way to do something that is completely fool proof, but you can definately make it harder

the more you protect the movie the harder it is for people to play it.

the most secure way would be using a java applet, which would stream the song after authenticating with the server, however even java can be decompiled and the song can still be downloaded.

--will
     
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status: Offline
Reply With Quote
Nov 23, 2003, 10:07 AM
 
yeah, i'd use Flash too.

1. new movie, import the mp3, export file as hidden_mp3s/song1.swf
2. make a movie which then loads hidden_mp3s/song1.swf

as you're loading a movie file in, the status bar won't give away the location of the files, so you're pretty much safe.

of course, wget can easily get around that problem by sucking the entire site up. if you really don't want people getting your files, throw some .htaccess goodness in there too.

oh, the files will be in the cache on some machines anyway, so you're never 100% guaranteed to keep it to yourself.
"Have sharp knives. Be creative. Cook to music" ~ maxelson
     
greenG4  (op)
Grizzled Veteran
Join Date: Aug 2002
Location: Cardboard Box
Status: Offline
Reply With Quote
Nov 23, 2003, 02:13 PM
 
Originally posted by philzilla:
oh, the files will be in the cache on some machines anyway, so you're never 100% guaranteed to keep it to yourself.
This should work for that, right?

META HTTP-EQUIV="pragma" CONTENT="no-cache"
<Witty comment here>
www.healthwebit.com
     
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status: Offline
Reply With Quote
Nov 23, 2003, 02:47 PM
 
Originally posted by greenG4:
This should work for that, right?

META HTTP-EQUIV="pragma" CONTENT="no-cache"
no, that's different. that just means the browser grabs a fresh copy from the server, every time it gets a request for the page.

Windoze IE downloads everything to an easily opened temporary internet files directroy on the hard drive. if you want a file that has just loaded, you can just get it from that directory.
"Have sharp knives. Be creative. Cook to music" ~ maxelson
     
Grizzled Veteran
Join Date: Jun 2001
Location: Melbourne, Australia
Status: Offline
Reply With Quote
Nov 24, 2003, 04:02 PM
 
Can you install Darwin Streaming Server? Then just stream your mp3's and there will be no cached files to worry about.

Of course if someone's REALLY determined, they'll use one of those audio capture utilities, but if you're still worried about people stealing your audio/video once it's at that point, then you shouldn't be publishing it on a public website!!!
Computer thez nohhh...
     
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status: Offline
Reply With Quote
Nov 24, 2003, 04:07 PM
 
heh yeah. just have an address where they can turn up and listen to the files, but only after they've passed an anti-bugging inspection
"Have sharp knives. Be creative. Cook to music" ~ maxelson
     
greenG4  (op)
Grizzled Veteran
Join Date: Aug 2002
Location: Cardboard Box
Status: Offline
Reply With Quote
Nov 24, 2003, 07:22 PM
 
Originally posted by Simon Mundy:
Can you install Darwin Streaming Server? Then just stream your mp3's and there will be no cached files to worry about.
I have no idea how to do that....
<Witty comment here>
www.healthwebit.com
     
Mac Elite
Join Date: Aug 2003
Status: Offline
Reply With Quote
Nov 24, 2003, 07:50 PM
 
" I know how to do this for pictures using java script"



Client sided javascript is absolutely useless for any security or preventative methods... all the user has to do is turn it off in their browser and they can do whatever they want! Not to mention that 13% of web clients have scripting disabled in their browsers.

...just a thought.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 02:27 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2