So I wrote some php code to check the URL of the current site then compare it to the URL it should be located at and to e-mail me if somebody copy pasted my code and used it on there own site. Then I hit my head against my desk realizing that the PHP would be executed on the server and potential thieves would never even see that code.
So I keep trying to think of ways to stop a simple full copy paste of my website. Is it possible to do that sort of thing in java script or something that would inform me if my website was stolen or make it break if it was.
You could check the domain name via
document.domainin Javascript, and if it doesn’t match your domain, make an AJAX request to your server to send an email.Make sure you obfuscate the code through uglify, minify, etc.
This would protect it from newbies copying your pages without reading the code, whereas decent programmers would be able to figure it out and remove it.