Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

my IT boss asks what is the best way to secure the PHP source code against illegal copy of the code once it is deployed to clients. Is there a PHP compiler that will make the final codes unreadable? By the way, i work for a software development company using PHP.

share|improve this question

closed as off-topic by gnat, MichaelT, World Engineer Apr 8 '14 at 0:09

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions asking us to recommend a tool, library or favorite off-site resource are off-topic for Programmers as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – gnat, MichaelT, World Engineer
If this question can be reworded to fit the rules in the help center, please edit the question.

Related: security.stackexchange.com/questions/40077/… - but basically the truth is nobody wants your code- protect your legal rights through legal channels. –  glenatron Apr 4 '14 at 16:48

2 Answers 2

The best way to secure your PHP code is through a contract with your clients.

Sure, you could probably buy or write your own obfuscator, but that would hinder you during support of your own product.

Consider that most clients will not have an idea that they could even look at the source let alone read and modify it.

share|improve this answer
Thanks for the advice and the link. Will heed same. –  user125868 Apr 4 '14 at 18:08

"Sign a legal contract"

This is a typical response to this typical question. It's neither right or wrong. It's an opinion that doesn't answer the question. It's like saying "keep a copy of the receipt" when someone asks how to keep their jewelry safe from thieves. The correct answer is buy a big iron safe.

The real problem is the question is often a waste of time in answering. Everyone is looking for a free solution, or they need something that will work on that other guys web server.

If you have those constraints and you're also worried about copy protection. You're already doing it wrong and we can't help you. A contract and the fact that no one cares about your source code is likely your only hope.

For people actually interested in doing this the right way. Take a look at Zend Server + Zend Guard.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.