Register to reply

Block text from being copied

by ahrkron
Tags: block, copied, text
Share this thread:
ahrkron
#1
Mar31-04, 12:00 AM
Emeritus
PF Gold
P: 734
Say you have a website with mainly text, but that you want people not to be able to just "copy-paste" from it.

Is there a way to make the browser:
1. Download the content as text (so that the speed stays ok),
2. Display it normally, but
3. Block any user from selecting a portion of it (so that he cannot copy it into another application)
???
Phys.Org News Partner Science news on Phys.org
World's largest solar boat on Greek prehistoric mission
Google searches hold key to future market crashes
Mineral magic? Common mineral capable of making and breaking bonds
Greg Bernhardt
#2
Mar31-04, 12:05 AM
Admin
Greg Bernhardt's Avatar
P: 9,328
Quote Quote by ahrkron
Say you have a website with mainly text, but that you want people not to be able to just "copy-paste" from it.

Is there a way to make the browser:
1. Download the content as text (so that the speed stays ok),
2. Display it normally, but
3. Block any user from selecting a portion of it (so that he cannot copy it into another application)
???
Nope, no way to make your website content completely safe. If someone wants to store it or copy it there is no sure protection. Sorry
chroot
#3
Mar31-04, 12:18 AM
Emeritus
Sci Advisor
PF Gold
chroot's Avatar
P: 10,429
Well, you could potentially use a Java applet to display the secure content. You could make it pretty damn difficult to copy and paste it that way.

Of course, in the end, it's all just bytes over a network connection, and anyone with enough sense can look at those bytes. Using some kind of cryptosystem will make the content difficult to copy -- but never, never impossible.

- Warren

ahrkron
#4
Mar31-04, 12:26 AM
Emeritus
PF Gold
P: 734
Block text from being copied

Thanks guys,

Actually, I don't need all the way to "impossible". "Kind of hard" would be good enough. Some friends of mine are putting together a site for homework help in Spanish, and they want the kids to be forced to at least type the answers once (or look it up by themselves, which would be equivalent to doing the homework). What can be done for this? Any web references, or code snippet that could be used?
enigma
#5
Mar31-04, 01:26 AM
Emeritus
Sci Advisor
PF Gold
enigma's Avatar
P: 1,817
Could you make the pages be .pdf's, or does the size become to large to handle then?
ahrkron
#6
Mar31-04, 01:30 AM
Emeritus
PF Gold
P: 734
They started making png's out of the text (with "watermarks" behind the text), but it doesn't quite cut it.
Dagenais
#7
Mar31-04, 09:55 AM
P: 396
Is there a way to make the browser:
1. Download the content as text (so that the speed stays ok),
2. Display it normally, but
3. Block any user from selecting a portion of it (so that he cannot copy it into another application)

This code disables all clicks from the user of your site:


<script language="javascript">

// No click script


function click() {

if (event.button==1 || event.button==2) {

alert('Sorry, that function is disabled')

}

}

document.onmousedown=click

</script>
NateTG
#8
Mar31-04, 11:24 AM
Sci Advisor
HW Helper
P: 2,538
Except for those of us who know how to turn off javascript.

Oh wait, that's too easy, let's take a screen shot instead. If you can't handle giving out images, odds are you can't handle distributing the material in any format.
ahrkron
#9
Mar31-04, 02:30 PM
Emeritus
PF Gold
P: 734
It is not an "on-off" thing. The smaller the download size, the better.
Dagenais
#10
Mar31-04, 05:47 PM
P: 396
Except for those of us who know how to turn off javascript.
Can you suggest a better solution?

ahrkron, maybe you can do something to your site in which you have to have javascript enabled to make it work.

Disabling all clicks stops them from right-clicking/copying, or being able to highlight and select text completely.

It's your best bet while displaying the site normally you can block most users from displaying the text.
chroot
#11
Mar31-04, 07:10 PM
Emeritus
Sci Advisor
PF Gold
chroot's Avatar
P: 10,429
Listen guys, forget the browser. You can spend all your time trying to make people's browsers not allow things, but who cares? Anyone with half a brain will type:

telnet server.com 80
GET /page.html HTTP/1.0

and be done with it. No browser needs to be involved. Or the user can use his browser's view source feature. Or he can use a packet sniffer to dump all the IP traffic, and read the bytes from that.

Bottom line, if the bytes go across the network unencrypted, they can be captured by anyone with more than a dozen neurons.

You could use https to prevent people from capturing packets off the network, but then you have to deal with the security limitations of the browser. Hence, you make a Java applet, or a custom program, that does its own decryption.

It still doesn't prevent the user from taking a screen shot of it.

- Warren
motai
#12
Mar31-04, 08:29 PM
motai's Avatar
P: 496
Even if there were a way to copy-protect the text, It still would be pretty easy to copy it: Just take the page and hit Print Screen on the keyboard and paste it onto Paint and save it as an image.
Dagenais
#13
Apr1-04, 12:04 AM
P: 396
Even if there were a way to copy-protect the text, It still would be pretty easy to copy it: Just take the page and hit Print Screen on the keyboard and paste it onto Paint and save it as an image.
Chroot and NateTG have already mentioned the "screen shot" problem before, no need to mention it for a 3rd time.

Would you rather them be able to freely copy and paste?

His problem was that he didn't want users selecting portions of text on his website - so the most logical thing to do is disable clicks.
faust9
#14
Apr1-04, 02:14 AM
P: 997
Hide text that is the same color as the background and use that as spaces. For instance if I was going to do this, I'd say:

The<FONT COLOR ="white">X<\FONT>answer<FONT COLOR ="white">X<\FONT>to<FONT COLOR ="white">X<\FONT>the<FONT COLOR ="white">X<\FONT>question.

here's what the above would look like when rendered by Safari (to heck with MS). Cut and paste to see what I you get.

The xanswerxtoxthexquestion.

There is a slightly larger gap between 'The' and 'answer' because I squeezed two characters in ther. You can fiddle with the font size of the two characters to make them look like one character.

In the above, the 'X' would not show if the background color was white, but it would show if the student simply cut and pasted. You can hide a few marks like this to indicate if the cut and paste was used. Purposly miss spell selected word using the hidden words as indicators. I wouldn't recomment filling every blank as I did, but one or two blanks would be enough to show if the cuts and pasts are going on. If you do the above, use courier font if you can because each character, including spaces, occupies the same width. Also, you can set the font size between one of the gaps to 6 which would allow you to put a space and a character in the same space as a font size 12 would occupy. People usually miss the single characters mistakes.

Hopeful I explained this well enough. I'm a little tired thus my ability to express myself is less than optimal.

You wont stop cutting and pasting but you'll be able to catch them in the act. Warn the kids the first day of class. Bring their names up the first time they get caught doing it to the entire class. "Johnny, you might try typing in the assignment as I said not cutting and pasting." This lets them know you can catch them. yadda-yadda-yadda...

As far as disabeling clicks, you can do it pretty easily, but you can get around that just as easily.


EDIT: Argh!!! fixed my AFU HTML example.
ahrkron
#15
Apr1-04, 09:35 AM
Emeritus
PF Gold
P: 734
Quote Quote by chroot
Listen guys, forget the browser. You can spend all your time trying to make people's browsers not allow things ... Anyone with half a brain...
Think of the context. I agree that some kids will still be able to get around any protection, but the site is for help for kids from 6 yo on; for sure, most of them won't be able to do a telnet + get.

Quote Quote by motai
... hit Print Screen ...
They thought about this. Can be easily solved with a graphic background with a logo and saying "Taken from such website". This of course can also be overcome, but again, most kids won't know about graphic filtering, color histogram editing, etc.

Also, the tips and answers provided are often short enough to make it easier to retype than to "process".

faust9:

Good idea! Thanks.


Anyway, does anybody know any other ways to make text-copying even slightly difficult?, besides the ones already mentioned?

Thank you all.
dduardo
#16
Apr1-04, 11:49 AM
Emeritus
dduardo's Avatar
P: 1,919
I think the best way is to have a picture with some type of background, preferable alternating light gray and dark gray dashed grids across the picture. This way if you do a print screen and run the image through OCR the program will have trouble converting the picture into plain text. You also want to bleed the grids into the text in a way so it is readable, but you can't just take the picture into photoshop and use the magic wand to select the grid and delete it.
Nereid
#17
Apr1-04, 12:54 PM
Emeritus
Sci Advisor
PF Gold
P: 4,014
I think faust9 is on the right track ... rather than try to prevent it, set it up so catching it is easy. Your purpose is probably more to do with encouraging 'proper' behaviour and good learning styles than setting technical hurdles (whose defeat may be an irresistable challenge to some).

As always in teaching, knowing your students well is best for your own pedagogical objectives (and, hopefully, their educational experience ), so it's better that you know what's going on (and they don't). One problem I've seen is the 'help' which some students get, from siblings, friends, parents ... (may not be relevant at all for you).

In addition to faust9's double spaces, you could add unicode characters which look all the world like English letters but aren't, an occassional (double) quote mark for an apostrope, ...
faust9
#18
Apr1-04, 02:11 PM
P: 997
Also, to add onto my idea, you could write a program that would allow the teacher to enter the sentence he/she wants and the script would then automatically generate HTML code with random letters shoved into the spaces. The HTML program would be pretty easy to write thus making the whole process much easier. If you can run a PHP server life could be made even easier. You, or someone, could develop a PHP script to parse sentences for spaces and then insert random characters each time the particular sentence is downloaded. PHP is server side so you can set up a simple txt format data base of sentences and the PHP will do the rest. By inserting random characters each time the sentence is loaded to the browser you make it tougher for one student to tell another student which characters to remove. Also by inserting random characters into every space you will end up forcing the student to read the sentence and analize each word to find the offending characters anyway. The system is easy to figure out but hard to get around because the work is being done on the server rather than the student's computer. Cutting and pasting would be easy but removing the offending characters would be cumbersom. I wouldn't use numbers as the random characters because numbers would stick out while lower case letters would probably blend in fairly well.

One way to crack this would be to use a script to parse the HTML code for the <FONT COLOR="white">_someCharacterHere<\FONT> and simply replace this with a space. Students with a fair amount of programming experience could do this, but I dare say few would.

I think you know there are no ways to truely stop students from getting around this, or any system, but there are ways to discourage this. If the process is easily figured out but more burdensome to circumvent than simply doing what is required then most will end up doing what is required.


Register to reply

Related Discussions
Simple harmonic motion, spring, block on block, static friction help Introductory Physics Homework 4
Block move down the curved hill and hit attached block spring with diagram Introductory Physics Homework 20
May have copied wrong... Calculus 1
LaTeX output not copied to FILE ! Why? Math & Science Software 17