If you do not need people deleting your check, you really need to add an if , which checks whether the installed license key is correct or not.
I noticed that you mentioned that your license keys were just SHA1 hashes. You can easily add an additional 4 characters to the hash, which you could use as a checksum.
For instance:
function generate_key() { $serial = sha1(uniqid(rand(), true)); $checksum = substr(md5($serial), 0, 4); return $serial . $checksum; } function verify_key($key) { $serial = substr($key, 0, 40); $checksum = substr($key, -4); return md5($serial, 0, 4) == $checksum; }
This is a very simple example, but it is just a tutorial.
Essentially, you should check if the license key is valid on the host server, and not ping the script on your server.
The disadvantage of this is that anyone can generate a valid key by opening the source code and finding validate_key .
You could call an external script to do verify_key , but is it really worth the effort? In addition, you will sacrifice page load time to verify the key.
I remember that vBulletin had a very easily cracked licensing system, but they had a 1x1 hidden image in several sections that pinged a script in their domain. Using the magazines, they were able to determine which domains hosted illegal copies of their software, and they simply sent a letter to the administrator with a lawyer.
If you would like to get a more reliable solution, I would suggest that I might look at Zend Guard , but you don't seem to care about people hacking your software so personally I would just go as simple as possible.