On our WordPress site we would like to have some pages or files made available only to members who pay a fee to view the material once. The content could be either a site page or a PDF, but the key is we want a member to only be able to see it just that one time, and we also want to be sure the client cannot print, copy or share it.
We realize anything on the screen can be grabbed, and yes, there in theory will always be some who will then run it through an OCR or simply type it out, but the number will be relatively small, especially within our specific group. So with all that said, do you know of a “best” way to protect a page or file from being easily shared or printed?
Thank you!
By the very nature of web content being loaded into your browser it’s technically on your system as a temporary file. PDF is meant to be a PORTABLE document.
As for a webpage you can create new print styles that will mess up the printing, and add some javascript to make copying a pain, but this is hacking the intended purpose of web documents.
Another alternative (not that I’m endorsing this!) would be to make the content in Flash! It’s always a pain to rip off 😉
You could setup a simple database access table that stores a userid against the page/file URL.
when the user views a page then you can check against this table, something like:
if you get a result then allow access, and delete the row. Next time they try the URL, there will be no result, so deny access.
With pdfs, to implement this you would need a wrapper script that you call with a parameter ($_GET[‘resource_id’]), which contains the above code and then outputs the pdf contents to screen using headers and file_get_contents().
NOTE: This of course wont solve the problem completely as others have mentioned, but should add an extra layer of protection, as it will prevent a URL from being shared