Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
How to protect website source cdoe/disable right click
Old 09-09-2009, 03:54 AM How to protect website source cdoe/disable right click
Novice Talker

Posts: 5
Name: rick
Trades: 0
Can someone let me know either via CSS code, Html or Php script how to protect my source code where when someone right clicks to view the source code it would difficult to past and copy, or even better yet, the source code would not show.

Any help would be greatly appreciated.

Rick
RICK430 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-09-2009, 04:06 AM Re: How to protect website source cdoe/disable right click
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,985
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
Right click disabling is not effective in preventing someone from viewing your source.

In short, there's nothing you can do to hide your source code on the internet, except for server side code which is processed before anything is sent to the browser. After code hits the browser, it is all fair play.
__________________
Join me on
Please login or register to view this content. Registration is FREE
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 09-09-2009, 04:06 AM Re: How to protect website source cdoe/disable right click
Chris`'s Avatar
Average Talker

Posts: 26
Name: Chris
Location: California
Trades: 0
This is not really a good idea. Disabling right click is very annoying to visitors, and besides, there are other ways of viewing it. For example, the hotkey for viewing the source, and just download the page as .html.

The only thing you could do to create a sub-level is you encrypt the source. It wont do much, because anyone can decrypt it, but it's better than nothing and may stop some visitors.

Edit: And note that doing so could degrade your website's performance.
__________________

Please login or register to view this content. Registration is FREE
| Fast, Reliable, cPanel Hosting.

Providing Unreal Support, hosting happy customers.
Advanced Hosting Solutions, We Purge the Competition.
Chris` is offline
Reply With Quote
View Public Profile Visit Chris`'s homepage!
 
Old 09-09-2009, 04:37 AM Re: How to protect website source cdoe/disable right click
Experienced Talker

Posts: 45
Trades: 0
Quote:
Originally Posted by Chris` View Post

The only thing you could do to create a sub-level is you encrypt the source. It wont do much, because anyone can decrypt it, but it's better than nothing and may stop some visitors.

Edit: And note that doing so could degrade your website's performance.
Is this javascript-based encryption?
__________________

Please login or register to view this content. Registration is FREE
: Learn more about Web Hosting!
arbet is offline
Reply With Quote
View Public Profile Visit arbet's homepage!
 
Old 09-09-2009, 04:44 AM Re: How to protect website source cdoe/disable right click
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,985
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
Quote:
Originally Posted by arbet View Post
Is this javascript-based encryption?
That would be the only reasonable way possible. One day, I got bored, and made a dumb example of this. You can see my results and the comments here: Useless advice + a pointless contest
__________________
Join me on
Please login or register to view this content. Registration is FREE
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 09-09-2009, 08:49 AM Re: How to protect website source cdoe/disable right click
lynxus's Avatar
Awesomeo-Maximo

Posts: 1,615
Location: UK
Trades: 1
Either way, if its good or bad,
Heres the code:

Quote:
<script language=JavaScript>
<!--

//Disable right click script III- By Renigade (renigade@mediaone.net)
//For full source code, visit http://www.dynamicdrive.com

var message="";
///////////////////////////////////
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!docum ent.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document. onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontext menu=clickIE;}

document.oncontextmenu=new Function("return false")
// -->
</script>
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE


lynxus is offline
Reply With Quote
View Public Profile Visit lynxus's homepage!
 
Reply     « Reply to How to protect website source cdoe/disable right click
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting 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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.23940 seconds with 12 queries