How to hide the source code of the PHP file?

9

I developed a system and the place where I work wants to distribute it by all the branches, I do not intend to charge for it while I work there, but if one day I leave yes.

The system is made in PHP, so I would like to know if there is any way I can camouflage my code, embarrassing, I do not know, and anyway it remains functional, or some other alternative, because if I leave and you have someone else which encodes PHP it will be able to tinker with my code.

    
asked by anonymous 31.05.2014 / 03:25

2 answers

13

There are sim means of protecting the code , however, the best, Zend Guard and IonCube , are commercially licensed.

Obfuscation of the code makes Reverse Engineering quite difficult because basically the code will no longer be written as you wrote it (variable names, functions, etc.) and then it is coded and optimized. / p>

However, closing the source code does not ensure your intellectual property, and does not exempt you from any contractual responsibilities you may have with the company, if any.

This is because many companies usually own ownership of everything that is developed or conceived in the work environment. And in these cases not only you can not as you should not restrict access either to the application, through a software degree, or to its source code either by the cited tools or other competitors.

    
31.05.2014 / 03:59
4

A complement to the existing response,

try to look like an "offender." If it were you in the place of the person who wants to "steal / copy" the system and modify it for reuse or resale without authorization.

What work would you have to copy?

First, you need to adapt to the style of the code, understand the structure and accept the structure as it is, and most likely maintain the same pattern.

Only this work in understanding the structure is something very complicated. It is usually easier (less complicated) to choose to write a new system from scratch.

A system of your where you have control, when a bug comes you know where and how to solve efficiently.

Already in a third system when a bug appears you get lost without knowing for sure how to solve and then start gambiarras. The system is becoming a nightmare for maintenance. Ultimately the cheap is expensive.

A serious and competent programmer, such as a serious customer, would never choose this path.

Of course there are people of bad faith and dumb people who will copy / steal parts of codes or the whole system. Regarding this, do not worry. Of these guys, neither you nor anyone else will win anything because these guys are parasites. They will always want to cheat, steal something, because they are mediocre. Even if you get a contract and start a job, at some point you will be passed back.

Working with mediocre people is loss, loss of time.

Offer your products and services to serious people and period. As for rats, let them eat the remains and fall into traps.

Therefore, in short, make the open source code under a license in which you do not allow modified copies without authorization.

Note that "open source" does not mean "free". You can even generate serial numbers for each use license even if it is free to use. And you can also register at a notary and patent.

With due legal records, you can file lawsuits against anyone who violates the terms of use. If you evaluate that it is worth bringing a lawsuit.

There is usually no legal action against people with small businesses because the legal cost is greater than a probable indemnity. So basically expect the offender to make a good profit to start a lawsuit. Usually it's win-win. You will receive good compensation and may even completely break the offender's business. Not that it is pleasant, to see the misfortune of others, but for being fair and that is what matters, to be just.

    
09.07.2016 / 09:15