|
|
|
|
![]() ![]() |
Aug 9 2006, 06:02 AM
Post
#1
|
|
|
Newbie ![]() Group: Members Posts: 1 Joined: 9-August 06 Member No.: 28,025 |
This script will help you to protect your source code
Add this to <BODY> Section of your site ! HTML <script language=JavaScript> var message="Function Disabled!"; /////////////////////////////////// function clickIE4(){ if (event.button==2){ alert(message); return false; } } function clickNS4(e){ if (document.layers||document.getElementById&&!document.all){ if (e.which==2||e.which==3){ alert(message); return false; } } } if (document.layers){ document.captureEvents(Event.MOUSEDOWN); document.onmousedown=clickNS4; } else if (document.all&&!document.getElementById){ document.onmousedown=clickIE4; } document.oncontextmenu=new Function("alert(message);return false") </script> Thank You ! |
|
|
|
Aug 10 2006, 05:35 AM
Post
#2
|
|
|
Newbie [Level 2] ![]() ![]() Group: Members Posts: 31 Joined: 8-August 06 Member No.: 27,978 |
Thanks for the script. But if you do a web search, you can find many more similar scripts with advanced functionalities along with "no right click".
|
|
|
|
Aug 14 2006, 10:10 PM
Post
#3
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 273 Joined: 14-April 06 From: Ontario, Canada, North America, Planet Earth Member No.: 21,845 |
Does it work when you press CTRL+F3 in Opera?
What about CTRL+U in Netscape and Firefox? Will it block View > Source in most browsers? I haven't tried it yet. Just consider saying "Block Right-click Menu" instead of "Protect your Source Code". That way people will be less confused. |
|
|
|
Aug 14 2006, 11:13 PM
Post
#4
|
|
|
Trap Grand Marshal Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 1,317 Joined: 11-January 06 From: Chennai, India Member No.: 16,932 |
This script is widely availabe in the net. Try to get some script that makes it not possible to view the code using, View> Source.
|
|
|
|
Aug 14 2006, 11:25 PM
Post
#5
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 205 Joined: 14-March 06 From: Vermont or Boston (USA) Member No.: 20,077 |
I've seen this type of script before. In my opinion it is kinda useless. I say this mostly because in virtually every browser you can click on the "View" menu and then choose "Page Source" from the list...which will accomplish the exact same thing.
As a matter of fact, I don't believe I've ever seen this code deployed on a professional site...usually only on hastily made blogs, etc. I hand code all my pages, and honestly wouldn't really care if someone copied pieces of the code (ignoring php for a moment). Most of the time it is entirely specific to my page, so the amount of effort required to change/contort it into being used in something else would probably be close to just rewriting it from scratch. As they say, "limitation is the highest form of compliment." If you are really concerned about keeping the coding of your site secure then you should either a) encrypt the entire thing and then parse it through a filter (this will greatly increase the cpu usage on your server, as well as requiring more time for the page to load); or B) purposefully write incredibly convoluted code that no one but yourself can understand (which is a waste of time, and probably won't be nearly as efficient as a correctly written page would be). In other words, I'd say both options are kind of a waste of time. Just my 2cents. This post has been edited by gaea: Aug 14 2006, 11:31 PM |
|
|
|
Aug 14 2006, 11:40 PM
Post
#6
|
|
|
Trap Double Mocha Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 2,228 Joined: 5-November 05 From: That one place over there... Member No.: 13,830 |
Ya I have used that before but the Control + C still usually works for the ones I have tested anyway. I don't know if there will ever be a fool proof script that can keep people from copying but that does help. You just have to find a way to stop from the selecting of text on a screen like making it into pictures but that would take too much time.
|
|
|
|
Aug 15 2006, 12:20 AM
Post
#7
|
|
|
Trap17 Maverick ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 1,125 Joined: 5-January 06 From: Michigan, USA Member No.: 16,652 |
In most cases, at least those persons using iExplorer, you can save the whole page including all graphics by going up to File> Save As. There are so many tricks to copying sites I don't see how it can be totally prevented. But, remember, it is a great compliment when somebody wants to imitate your work.
|
|
|
|
Aug 15 2006, 01:38 AM
Post
#8
|
|
|
Master of All Typos ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 621 Joined: 30-July 06 From: Earth, Usa, Maine, Waterford, Member No.: 27,507 ![]() |
Hmm Disabling right click. I ahve heard of that. I tried right clicking one time. I message poped up saying Hahaha Nice try no doing that here. But it is still possible to copy ever piece of that Site. Easily. Unless you are not smart enough too.
|
|
|
|
Aug 16 2006, 11:05 AM
Post
#9
|
|
|
Legend Killer ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 678 Joined: 15-April 05 From: Singapore Member No.: 5,697 |
This script actually is used to fool internet users that have little experience in it... Practically, all of us here knows how to work our way around with it, with a simple View --> Source method! Perhaps its better without the script so as to save the loading time of your webpages...
|