How to copy protect images in my website?

Posted in Help the coder! on Sep 16, 2009 at 16:09 IST (over 4 years ago). Subscribe to this post Bookmark and Share Email
Showing comments 1 to 8 of total 8 on page 1 of 1
Post reply
« Previous1Next »

mathewge...
Rank: 102

Hello all,

I've been running around to start a site on my own for a while now. I have almost completed the coding and design. But now, i wish to add one more feature to it. I want to protect the images in my site, ie, users should not be able to copy them. For this i want to disable right clicking in the image area.

What is the method to do this? It will be great if i can accomplish this using PHP and Javascript!

Posted by mathewgeorge on Wednesday, September 16, 2009, 4:09 pm
  • Currently 0.00/5

0 votes

Thank this userFlag this comment
Anyway PRINTSCREEN will always work ??
Posted by damngoodman on Wednesday, September 16, 2009, 5:04 pm
  • Currently 0.00/5

0 votes

Thank this userFlag this comment

robinalex
Rank: 1
Refer the following JavaScript:
This allows you to disable right click specific to images.
Posted by robinalex on Thursday, September 17, 2009, 12:24 am
  • Currently 0.00/5

0 votes

Thank this userFlag this comment

tonypv
Rank: 6
Hi Mathew,
As damngood said, printscreen option is always there. :( u can use a watermark and rightclick prevention script. good luck.

Tony
Posted by tonypv on Saturday, September 19, 2009, 3:50 pm
  • Currently 0.00/5

0 votes

Thank this userFlag this comment

crusader
Rank: 43
Yeah, Tony is correct. There is no way you can stop someone from print screening your image. But there are plenty of other methods. For example, JavaScript method captures the "right-click" mouse event and runs a JavaScript that informs the person that the images on the page are copyrighted and not available for download.

Still, there are loop holes for every such method. If the user has firebug tool and enough know-how, then he would be able to copy 'any' image from site.
Posted by crusader on Monday, September 21, 2009, 11:18 am
  • Currently 0.00/5

0 votes

Thank this userFlag this comment
^^ Yep, thats right. By the way why you want to block your image from accessed by others. And disabling the right click isn't a good practice at all. A best web-design doesnt restrict user from doing such things. BTW Even though the right click disabling is an option, but its not the remedy. The user will save the image by just saving the whole page. Test it and bounce back dude.
Posted by rajkumar_pb on Tuesday, September 22, 2009, 3:41 pm
  • Currently 0.00/5

0 votes

Thank this userFlag this comment

robinalex
Rank: 1
We need to see some facts; imagine you are protecting image in your site.
Good percentage of users who want’s the image in your site doesn’t not know these things; and the small percentage of users who know these things, knows how to get better image for their need faster than un-protecting yours.  So, finally your image is protected up to a very good extended even if you are using very simple protection method.
P.S. How many of you really wants protected images from Mathew George's site?
Posted by robinalex on Wednesday, September 23, 2009, 9:54 am
  • Currently 0.00/5

0 votes

Thank this userFlag this comment

xtrmprgrmr
Rank: 7

Try this:
<script language="JavaScript">
<!--

var popup="Sorry, right-click";
function noway(go){
if (document.all){
if (event.button == 2){
alert(popup);
return false;
}
}
if (document.layers){
if (go.which == 3){
alert(popup);
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=noway;

// -->
</script>
Post back if u come across any probs. You can find more on this if you just google around!
Posted by xtrmprgrmr on Wednesday, September 23, 2009, 10:52 am
  • Currently 0.00/5

0 votes

Thank this userFlag this comment
Pages: « Previous1Next »

Post your comment (No registration required)

  Add my comment  

TechieDesi Community

Not signed in (Sign-in or Register)
Be a true TechieDesi!
Top 10 Users
Spread the word
Invite your friends
Fan stuff
Help us improve
Need Help
FAQ's
Search tips
Found a bug? Report!
Feeds and letters
Subscribe via RSS
Archives
Subscribe to newsletter
Unsubscribe e-mail
Miscellaneous
Privacy policy
Visit rootnerve
About us
About us
Support the development
Official Blog
Advertise with us
Careers
Copyright (c) 2008, TechieDesi.com. All rights reserved | About us | Do-Not-Disturb registry | Powered by rootnerve | Page rendered in 0.029 seconds