I have a database of questions for some tests. They will be uploaded on a website so that the users can browse them but I would like to make it hard for the users to copy them.

I am using php to interface with the database. I have thought of using a function to convert the questions to images and store those images in the database, while disabling with javascript the right click possibility (to save the image). I don't know if this is the best option for the bandwith and processing on the server.

Is there a way to create an interface to allow them to browse through the questions while not allowing them to select, copy them? Thank you.

Recommended Answers

All 5 Replies

I think that your first sentence is closer to the truth than the last. You can make it harder but you can't prevent them from copying the questions. You can copy anything on the screen with a print of the screen, or the Win7 Snipping Tool or a variety of other utilities. You may be able to restrict copying actual text but even that isn't absolute.

I am aware that printscreen is an option but I want to limit it to that.

I've never tried to prevent copy-and-paste-ing, but I wonder if putting a full screen div over top of everything might do the trick. With proper z-indexing, the div would be placed above the text.

Unfortunately I'm thinking you'll have to have a background colour in order for the div to do it's masking job. If your users have browsers that don't support the CSS opacity property, or the rgba() colour space - the page would be broken for them.

with browser add-on like firebug and other third party application i don't really think it possible but if someone's got an idea i will be happy to hear about it cos i was also thinking about doing something like that a while ago.

Like was said - it's impossible to prevent users getting the information permanently. All the original poster wants to do is prevent copy-and-paste.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.