Нулевое и самое главное, что следует усвоить: Если сайт можно просмотреть, то его можно и скопировать. Поэтому, вся так называемая защита от копирования, обычно помогает от пользователя неискушенного. Хотя, чаще всего, именно такие и хотят "скопировать" текстовую информацию или картинки с сайта. 1)Простенькая
Code
<?if($USER_LOGGED_IN$)?><?else?><script language="JavaScript">
document.onselectstart=function(){return false}
document.oncontextmenu=function(){return false}
document.onmousedown=function(){return false}
</script><?endif?>
//Запрещение копирования - убирает контекстное меню 2) Обязательно вставьте в тэг код:
Выделите мышью приводимый ниже код, скопируйте его (командой Ctrl+C) и вставьте его (командой Ctrl+V) в свою веб-страницу в конце перед командным тэгом .
Code
<script language="Javascript1.1"><!--
function notmenu() { window.event.returnValue=false;}
// --></script>
<script language="Javascript"><!--
document.ondragstart = test;
document.onselectstart = test;
document.ontextmenu = test;
function test() { return false }
// --></script>
3)
Code
<SCRIPT language=Javascript1.2>
<!--//
function click() {
if (event.button==2) {
// Чтобы отключить левую кнопку поставьте цифру 1
// Чтобы отключить третию кнопку поставьте цифру 3
alert('The button of the mouse is off - Кнопка мыши отключена');
} }
// Здесь введите свою надпись
function press(){
alert('The keyboard is off - Клавиатура отключена');
}
// Здесь введите свою надпись
document.onmousedown=click;
document.onkeydown=press;
// -->
</SCRIPT>
4) Мощьный скрипт, умеет перенаправлять на пустую страничку - когда с ней работают автономно.
Code
<noscript><style>Table{display:none}</style></noscript>
<SCRIPT LANGUAGE="JavaScript">
hp_ok=true;
function hp_d01(s)
{
if(!hp_ok) return; var o="", ar=new Array(), os="", ic=0;
for(i=0;i<s.length;i++)
{
c=s.charCodeAt(i);
if(c<128)c=c^2;os+=String.fromCharCode(c);
if(os.length>80){ar[ic++]=os;os=""}
}
o=ar.join("")+os;
document.write(o)
}
function hp_ne(){return true}
onerror=hp_ne;
function hp_dn(a){return false}
function hp_cm(){return false}
function hp_md(e){
if(e.which==2||e.which==3){return false}
if(e.which==1){window.captureEvents(Event.MOUSEMOVE);window.onmousemove=hp_dn}
}
function hp_mu(e){
if(e.which==1){window.releaseEvents(Event.MOUSEMOVE);window.onmousemove=null}
}
if(navigator.appName.indexOf('Internet Explorer')==-1||navigator.userAgent.indexOf('MSIE')!=-1){
if(document.all){document.oncontextmenu=hp_cm;document.onselectstart=hp_dn}
if(document.layers){window.captureEvents(Event.MOUSEUP|Event.MOUSEDOWN);window.onmousedown=hp_md;window.onmouseup=hp_mu}
if(document.getElementById&&!document.all){document.oncontextmenu=hp_cm;document.onmousedown=hp_dn}
}
if(window.location.href.substring(0,4)=="file") window.location="about:blank";
function hp_nls(){window.status="";setTimeout("hp_nls()",10)}hp_nls();
function hp_dp1(){
for(i=0;i<document.all.length;i++){
if(document.all[i].style.visibility!="hidden"){
document.all[i].style.visibility="hidden";document.all[i].id="hp_id"}
}
};
function hp_dp2(){
for(i=0;i<document.all.length;i++){
if(document.all[i].id=="hp_id")document.all[i].style.visibility=""
}
};
window.onbeforeprint=hp_dp1;
window.onafterprint=hp_dp2;
function hp_dc(){
hp_ta.createTextRange().execCommand("Copy");
setTimeout("hp_dc()",300)
}
if(navigator.appName.indexOf('Internet Explorer')==-1||navigator.userAgent.indexOf('MSIE')!=-1){
if(document.all&&navigator.userAgent.indexOf('Opera')==-1){
document.write('<div style="position:absolute;left:-1000px;top:-1000px"><input type="textarea" name="hp_ta" value=" " style="visibility:hidden"></div>');
hp_dc()
}
}
function hp_ndd(){return false}
document.ondragstart=hp_ndd;
if(navigator.appName.indexOf('Internet Explorer')!=-1&&navigator.userAgent.indexOf('MSIE')==-1) hp_ok=false;
if(navigator.userAgent.indexOf('Opera')!=-1)window.location="about:blank";
if(frames){
if(top.frames.length>0)top.location.href=self.location;
}
</SCRIPT>
5) Для запрета на кэширование элементов веб-страницы необходимо сделать следующее указание в разделе
... любой из трех вариантов:
Code
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
6)Указание на мгновенное устаревание страницы выполняется командой:
Code
<meta http-equiv='expires' content='-1' />
7) Команда, указывающий, что данный документ не должен быть проиндексирован вежливыми роботами.
Code
<meta id="robots" content="noindex" />
Указание, что робот поисковой машины не должен идти по ссылкам с данной страницы.
Code
<meta id="robots" content="nofollow" />
Для одновременного запрета индексирования страницы и обхода ссылок с нее существует команда.
Code
<meta id="robots" content="noindex,nofollow" />
8) Для запрета распечатывания Ваших веб-страниц на принтере необходимо вставить этот модуль в свою веб-страницу в конце перед командным тэгом