Mordax Praetorian Posted January 31, 2008 Share Posted January 31, 2008 Is it possible with php to protect the text on a page from being copied, i.e.: Preventing selection of the text Preventing right-click menu's on the page Preventing copying of the text to clipboard if not, could anyone reccomend a non-php method to make any of the above happen I know its possible, I've seen it done before, I just need to know how Quote Link to comment https://forums.phpfreaks.com/topic/88678-protecting-text/ Share on other sites More sharing options...
pdkv2 Posted January 31, 2008 Share Posted January 31, 2008 It is possible using javascript Quote Link to comment https://forums.phpfreaks.com/topic/88678-protecting-text/#findComment-454117 Share on other sites More sharing options...
Mordax Praetorian Posted January 31, 2008 Author Share Posted January 31, 2008 ty, I will look for a solution using javascript Quote Link to comment https://forums.phpfreaks.com/topic/88678-protecting-text/#findComment-454118 Share on other sites More sharing options...
Azarian Posted January 31, 2008 Share Posted January 31, 2008 Is it possible with php to protect the text on a page from being copied, i.e.: Preventing selection of the text Preventing right-click menu's on the page Preventing copying of the text to clipboard if not, could anyone reccomend a non-php method to make any of the above happen I know its possible, I've seen it done before, I just need to know how I am going to play devils advocate here. I really don't know if you can do what you want with php some of the things you want to do would superceed OS and broswer operation. If you could, that wouldn't stop people from copying text off the site. Someone could easily make a screen shot and capture the info that way as well. Maybe the best solution if you don't want the info copied is to not post it? Quote Link to comment https://forums.phpfreaks.com/topic/88678-protecting-text/#findComment-454119 Share on other sites More sharing options...
irvieto Posted January 31, 2008 Share Posted January 31, 2008 there are a few javascript codes that prevent right clicking and other kind of keyboard events. The disadvantage is that is javascript and any user can disable javascript from their browser. Another option could be to make images with text, or using flash objects, but it will make your website bigger for such a silly thing like that. Quote Link to comment https://forums.phpfreaks.com/topic/88678-protecting-text/#findComment-454120 Share on other sites More sharing options...
Mordax Praetorian Posted January 31, 2008 Author Share Posted January 31, 2008 The purpose of the site is to present this information, it is litterature I know I'll never be able to stop someone who is determined to to rip me off, but this way I put forward an obvious message that I don't want the stuff appearing on other websites and will go to some lengths to protect it Quote Link to comment https://forums.phpfreaks.com/topic/88678-protecting-text/#findComment-454124 Share on other sites More sharing options...
pdkv2 Posted January 31, 2008 Share Posted January 31, 2008 function desMouseClick(){ if (event.button==2){ alert(message); return false; } if(event.keyCode == 116 || event.keyCode == 117 || event.keycode == 63) { event.keyCode = 0; event.returnValue = false; event.cancelBubble = true; return false; } } call this javascript function on load of body this will disable the mouse right click Quote Link to comment https://forums.phpfreaks.com/topic/88678-protecting-text/#findComment-454127 Share on other sites More sharing options...
PFMaBiSmAd Posted January 31, 2008 Share Posted January 31, 2008 Since a page can be saved in a browser through a normal menu item, disabling the mouse right click is a joke. The purpose of the Internet is to publish information. If you don't want your information to be viewable (which means it can be copied), then don't publish it on the public Internet. Quote Link to comment https://forums.phpfreaks.com/topic/88678-protecting-text/#findComment-454308 Share on other sites More sharing options...
haku Posted January 31, 2008 Share Posted January 31, 2008 ctrl+c or disabling javascript will get around disabling right click. If you want to make it difficult flash or an image is your best bet. Quote Link to comment https://forums.phpfreaks.com/topic/88678-protecting-text/#findComment-454320 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.