|
|
Hosting | Domain Registration | FAQ | Additional Services | Contact Us | Forums | About Us | Home |
|
Disable right click & stop bandwidth theft
|
|---|
|
Before you jump right down to the script, learn something more!!! If you use all the info on the page you leave the determined thief no alternative than to take a screenshot of your image and then edit it in a graphic program. To disable right click (works only on pc with MS operating systems), is practical if you have nice images or your own artistic work and you don't want people to (steal,) copy or save them to their harddisk and maybe use your images on their website or other publication and media. If you are afraid that they are to use your bandwidth read on. Those that steal bandwidth use "hotlinking" or posting your image on their website, and link it to load from your serverspace. When somebody looks at their page they steal or use your bandwidth that you pay for. The solution to stolen bandwidth or "hotlinking" is to host your site at ITfam.NET because in your control panel you can block theft from happening. In the control panel (from ITfam.NET) you can also make it so that if they encode the location of your image to be displayed on their website, then your web-hosting-solution from ITfam.NET re-directs the browser to a page you decide!!! This is a FREE feature for ITfam.NET hosting customers!!! You cannot hinder people from looking at your source code, BUT you can block people from typing the URL that displays the single image they want to see and then copy the image! (You cannot use the disable-right-click script in a window with only an image in it!) If you got questions about this, post them at the ITfam.NET support forum. OK, ok, enough alternative considerations and here is the script. It must be in the header of the page. In my test I placed it just before the header end-tag: </head> and it worked fine. <script><!-- //Disable right click script 1 - By ITfam.NET (http://www.itfam.net) var message=""; /////////////////////////////////// function clickIE() {if (document.all) {(message);return false;}} function clickNS(e) {if (document.layers||(document.getElementById&&!document.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.oncontextmenu=clickIE;} document.oncontextmenu=new Function("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> |
| Hosting | Domain Registration | FAQ | Additional Services | Contact Us | Forums | About Us | Home |
|
These sites are also a Martin Reinert initiative: 247DomainShop.com | Reinert.info | COMBITEAM.COM | Chery.dk | mr64.com |