How to prevent users from copying content from website

Given the tags you used:

  • PHP is server-side code, and your end-users will never see your code
  • HTML cannot be hidden from end-users
  • Javascript and jQuery cannot be hidden either, but they can be obfuscated by 'minifying' the code. Typically this is done using a program like JSmin (online tool available at http://jscompress.com/)

Check out ionCube HTML Obfuscator:-

http://www.ioncube.com/html_encoder.php

As of the text contents, Try this code:- Live Demo (IE isn't supported)

<script type="text/javascript">
document.oncopy = function(){
    var bodyEl = document.body;
    var selection = window.getSelection();
    selection.selectAllChildren( document.createElement( 'div' ) );
};
</script>

No, there is not.

Even if you could encrypt the source, the browser still needs to create the DOM structure which can be re-serialised as readable HTML.