View Full Version : Code to stop Copy and Pasting


tom111
11-09-2005, 08:46 PM
I want a code to stop visitors copy and pasting from my site?

I have a .php page.

Douglas
11-09-2005, 11:31 PM
this is impossible, you will never be able to stop someone from stealing content off your site, but there are some tutorials in the tutorial section on it, and a code in the javascript section too.

oincubusx
11-09-2005, 11:31 PM
Well here is a code for no highlighting which should result in no copying or pasting...

<script language="JavaScript1.2">

//Disable select-text script (IE4+, NS6+)- By Andy Scott
//Exclusive permission granted to Dynamic Drive to feature script
//Visit http://www.dynamicdrive.com for this script

function disableselect(e){
return false
}

function reEnable(){
return true
}

//if IE4+
document.onselectstart=new Function ("return false")

//if NS6
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}
</script>


or the nonjavascript version: <body onselectstart="return false">

putnamehere
11-09-2005, 11:38 PM
that will result in no right click, pressing ctrl - c gets round it.

this is impossible, you will never be able to stop someone from stealing content off your site
very true.

michael.r
11-10-2005, 03:05 AM
lol it is as simple as 1,2,3 to take content such as a picture so it is very true
you can't stop picture theft.

h4x0r
11-11-2005, 11:13 AM
Well here is a code for no highlighting which should result in no copying or pasting...

<script language="JavaScript1.2">

//Disable select-text script (IE4+, NS6+)- By Andy Scott
//Exclusive permission granted to Dynamic Drive to feature script
//Visit http://www.dynamicdrive.com for this script

function disableselect(e){
return false
}

function reEnable(){
return true
}

//if IE4+
document.onselectstart=new Function ("return false")

//if NS6
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}
</script>


or the nonjavascript version: <body onselectstart="return false">


Even that script won't stop them from highlighting, that just stops them from clicking and highlighting, they could still press ctrl+a...

Phillip
11-12-2005, 01:59 AM
I want a code to stop visitors copy and pasting from my site?

I have a .php page.

Hey you can do it! www.habbox.com has done it you have a box when you right click [Habbox has disabled the right click]

starlet
11-12-2005, 03:03 AM
Hightlight the text and hit ctrl+c or since they use javascript, just diasble javascript momentarily and tada.

I'm closing this thread as we have this discussion practically every week, please just trust us when we say although you can do things to slow people down from copying your stuff there is no way to block your source 100%