PHP5 - Disable user to copy website content and image
Discuss Disable user to copy website content and image in the PHP Development forum on Dev Shed. Disable user to copy website content and image PHP Development forum discussing coding practices, tips on PHP, and other PHP-related topics. PHP is an open source scripting language that has taken the web development industry by storm.
Posts: 12,717
Time spent in forums: 5 Months 1 Week 4 Days 7 h 29 m 55 sec
Reputation Power: 8969
It's not possible. Any sufficiently motivated user can grab all your HTML and Javascript and CSS and images and there's nothing you can do to stop that.
Posts: 262
Time spent in forums: 3 Days 2 m 7 sec
Reputation Power: 0
I have came across some website, when i want to click right click to copy the content, the website will prompt me "Copyright by company XXX".. and block me from copying the content. can't we do that in php?
same as image, when i right click to "Save as" one particular image, the system will also prompt me "Image under copyright of company XXX". thus i cant save.
Posts: 9,811
Time spent in forums: 2 Months 3 Weeks 19 h 13 m 52 sec
Reputation Power: 6112
No, you can't do it in PHP, all of what you're talking about is JavaScript.
And while that may have stopped YOU, it doesn't pose more than 15 seconds of a delay for me or Requinix.
These tactics only provide the bare minimum of protection for your site. If you send me a file, I will have it, that's the whole point. Anything you let the user see, they can keep. javascript which breaks the right mouse button just blocks legitimate users who want to email your pictures to their mom. It poses no obstacle whatsoever to the people actually attempting to rip you off.
"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin
"The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002
Posts: 12,717
Time spent in forums: 5 Months 1 Week 4 Days 7 h 29 m 55 sec
Reputation Power: 8969
To elaborate,
For your website to work you have to send some files to the user. Their browser. You must freely give over these files or else your website will not work. Since you've done that, I can look at those files and do whatever I want with them. I can make copies, look at the source, and perhaps even make changes to them (my versions, not the originals) while they're still in the browser.
That's why it's impossible to protect your content: because I already have a copy of it.
Posts: 1,879
Time spent in forums: 1 Month 2 Weeks 2 Days 7 h 8 m 37 sec
Reputation Power: 813
Hi,
I think you should completely forget this idea of "hiding" your content.
First of all, do you really think your site is so revolutionary that people will actually try to rip it off? No offense, but all pages I've seen with these stupid JavaScript alerts and tons of "copyright" signs were amateur home pages that nobody would bother copying, anyway. Professional sites simply don't use this.
Secondly, this is extremely annyoing for all users. Unless you offer special information that can't be found anywhere else, people will simply leave your site. Wouldn't you do the same?
And last but not least: "Features" like this make you look like an amateur. They're completely useless (as already explained), and they're somewhat out of fashion. This stuff was popular in the 90s (together with Java applets, blinking fonts and colorful backgrounds). Modern sites are a bit more ... subtle.
Last edited by Jacques1 : October 30th, 2012 at 05:09 AM.
Posts: 9
Time spent in forums: 2 h 56 m 13 sec
Reputation Power: 0
Instead of trying to hide your images etc why dont you just brand them with a watermark, nothing too ridiculous obviously but enough for someone to know where the picture came from.
That way of someone does copy and use your image you are getting free advertising from it anyway. Or they have to spend ages editing the photo to remove your watermark
Posts: 1,879
Time spent in forums: 1 Month 2 Weeks 2 Days 7 h 8 m 37 sec
Reputation Power: 813
The worst thing is that this stuff still gets copied and pasted around (kind of ironic for an anti c&p script). He has probably copied it himself from some dubious JavaScript "tutorial".
Dude, even if your users understand the Internet as little as you, what prevents them from simply making a screenshot of your precious images? That's what I did as a kid.
If you want to make sure nobody ever uses your content, simply don't publish it. Put it in a safe and don't let it anywhere near an Internet connection. But if you do publish it (and it's of any use), you'll have to live with the fact that somebody might actually "steal" it, no matter how much JavaScript magic, water marks and warning signs you put on your website.
But is this "stealing" really that terrible? Do you actually lose anything? And isn't sharing kind of what the Internet is about?
Simply put your content under your favorite licence and cut out all the outer stuff that just makes you look stupid.
Last edited by Jacques1 : November 1st, 2012 at 01:22 AM.