Jump to content

Protecting Text


Mordax Praetorian

Recommended Posts

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

 

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.