Jump to content

Recommended Posts

Posted

Hi TCH folks!

 

I was told that using Java scripts to disable right clicks ( to protect photos for ex. ) could be easily by-passed and that there was a way to accomplish the same with php or cgi scripts.

 

Is this true and does anyone know how?

 

 

thanks

 

Mike

Posted (edited)

Hi Mike!

 

First of all, allow me a small correction: you would use JavaScript, not a Java script. Java and JavaScript are two very distinct programming languages :huh:

 

As for your question, I really don't know but I doubt there is a way to do it. As you've been told, using JavaScript is no use since even a 10-year old can bypass that "security" measure.

 

I don't see how using a PHP or CGI script will help you either - there's no way you can prevent the user from interacting with the browser by using just a PHP or CGI script.

 

You see, the problem is that if the image is displayed on someone's browser, then it's already downloaded to the that person's computer. It's only a matter of him/her knowing how to get it. It could be as simple as right-clicking the image and selecting "Save image as..." or, if somehow you devise an unbreakable method to prevent right-clicking, the user can still go to the browser's cache and the image will be somewhere around there. Or the user could simply press the "Print-Screen" key on his keyboard to create a screenshot and then crop the photo...

 

So the only way you'd have to protect an image - that is, stopping your site visitors from stealing your photos, or something similar - would be to not allow them to see the image on their browser, because from the moment they see it on their browser, the image is already on their computer and they'll have tons of ways to get it.

 

Basically: don't waste your time with that... B)

Edited by TCH-Raul
Posted

Hi mike,

 

I'd just like to add a bit to what TCH-Raul wrote. He is absolutely right ... Javascript is a client-side programming language that really is at work on the user's computer. Server-side scripting can't affect what they do with their computer.

 

However, this is a topic that is of great interest to me because the thing that drew me into building web sites was creating graphics in Photoshop and Paint Shop Pro. I've learned a few tips and tricks about protecting your web images, if you're concerned about protecting your copyright.

 

There is no 100% fool-proof way to keep a user from getting their hands on your graphics. The best way to assert your copyright is to add a copyright notice on top of the graphic, so it becomes part of the graphic. You would simply put something like "© 2004 Mike" or "Copyright 2004 by Mike". Something along those lines. Integrate it so that it's part of the graphic. You can put it in a lower corner of the graphic so that it's unobtrusive to the graphic itself.

 

If you're really concerned about someone stealing your graphic and making it theirs (by simply cropping the graphic to remove your name and copyright from the lower corner), you can do like I do -- I use a very large watermark that covers the entire graphic. The watermark is light enough that it allows the underlying graphic to show through. But it's not light enough that someone would be able to "erase it." If they tried to erase it, they'd end up destroying the graphic.

 

But like TCH-Raul said, no matter what you do, the graphic will probably end up on their hard drive. Those who are determined enough to take your graphics probably already know this, so the best deterrent to keep them from using your graphic and claiming that it's theirs is to put a visible watermark or copyright notice right on the graphic.

 

If you have the money, you might also want to look into a digital watermarking program like Digimarc (www.digimarc.com). For a fee, they will grant you an electronic/digital watermark that you can invisibly embed into the graphic. Then you use Digimarc's bot to periodically search the web and find copies of your graphic that have been taken from your website. If someone were to take the graphic from your web site and use it on theirs, the Digimarc bot would find it. If they took your graphic and modified it before putting it on their web site, Digimarc's bot would still find it because the color aspects of the graphic (what you see) do not change or affect the internal coding that places your copyright inside the graphic. The copyright/watermark is like invisible ink -- you can only see it if you have the right bot from Digimarc.

 

I hope that's enough to give you some more background. Feel free to ask if you have any other questions.

 

Kasey

Posted (edited)

 

Why not offer something like this? http://www.dynamicdrive.com/dynamicindex1/contextmenu.htm

 

Works in Mozilla Firebird 0.7, Netscape 7, & IE (haven't tested on other browsers or on a Mac). While I agree with Raul, it offers another alternative. :huh:

 

later,

!!blue

 

-------------- edit -----------------

kaseytraeger, great advice! guess I better get on the ball!

-------------- edit -----------------

 

Edited by !!blue
Posted

Mike,

 

If you decided to go the route that Kasey was suggesting and put a copyright across your image...check out the way iStockPhoto does theirs. Not too obtrusive and it would be a little bit of a pain for a thief to get rid of it!!

Posted

Thanks for all the input folks. I really appreciate it.

I didn't know 10 year olds could get the cache stuff, I guess 'cuz I don't know how.

Anyway I will take a look at the photo site suggested and make a decision.

Thanks again.

Posted

Blue, the JavaScript pop-up menu can be bypassed easily, too. Just like you'd do to bypass the "no right-click" script, you only need to disable JavaScript on your browser and bang! All the protection is gone and you can right-click to your heart's desires :goof:

Posted

Where do you disable JavaScript?

 

I found the applet checkbox.

 

Rock Sign

Posted

If you wrote the image to the page using document.write() or something, and then used css to position a transparent gif(second image) over the entire first image, you could prevent a user from right clicking and saving the first image. If they were to right click, they would be prompted to save the transparent image. If they disabled javascript, the image would not display, and so therefore they would not be able to right click and save it. All this can still be bypassed by looking in the browsers cache though (as mentioned above)...

 

Just a thought. :)

Posted

As Raul said, if it is on someone’s browser... well it is on the browser.

 

The thing is though you can discourage some...

 

I look at it as the same as someone robbing a house. Those that lock the doors make it more difficult, those with deadbolts more so, then you can add an obvious security system, maybe even a nice looking German Shepard (or chocolate lab ;) ). Each addition is a little more discouragement and actually may filter out most of the thieves. However, ultimately if someone wanted in.... they could.

 

Therefore it is just a matter how much time you want to spend on discouraging others.

 

There was a nice (well long any way) thread about this a while back (remember this can you opened Ms. Tracy.... hmm sorry, Ms. Family Member of the Month?):

 

Image Security

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...