I create software using PHP. I'm going to sell this software so I need to protect my source code so that nobody can view it. How can I protect my PHP code so that the software still functions the same?
I also need to bind the software to a particular, authorized PC. It should not run on any other PC. How can I do that? Should I encrypt using LAN MAC address? Does anyone have any other ideas?
A PHP Obfuscator does the work of scrambling the source code of PHP script in order to make people find it very difficult to understand. Important things like the variable name, class, interface and function names are being replaced by PHP Obfuscators to something not meaningful.
If you'd really want to make it unreadable and inaccessible use APC or OPcache. Set the TTL to 0 and delete all files. Your website is delivered only from the cached files.
The only way to really protect your php-applications from other, is to not share the source code. If you post you code somewhere online, or send it to you customers by some medium, other people than you have access to the code. You could add an unique watermark to every single copy of your code.
Obfuscation means to make something difficult to understand. Programming code is often obfuscated to protect intellectual property or trade secrets, and to prevent an attacker from reverse engineering a proprietary software program. Encrypting some or all of a program's code is one obfuscation method.
What you may be looking for is not cryptography per se, but rather obfuscation. If you Google for "php obfuscate", many choices show up. The first one is from Raizlabs.
I put together the following list a ways back - don't know if they are all current, or how many are now free, but you should find something useful here:
About:
Software:
Another thread on SO that adds a few more (check it out):
Can I encrypt PHP source or compile it so others can't see it? and how?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With