How to hide source code from PHP file?

Asked

Viewed 2,639 times

9

I developed a system and the place where I work wants to distribute it to all the branches, I have no intention of charging 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, embarrass, I don’t know, and still it remains functional, or some other alternative, because if I leave and there is someone else who encodes PHP she will be able to move my code.

  • 2

    Why not turn this system into Saas? It hosts a vps (Amazon, linode, Heroku, digital Ocean, etc.) and frees access without others having visibility of the code.

2 answers

15


There are ways to protect the code, however, the best, Zend Guard and Ioncube, are commercially licensed.

The code is obfuscated which makes Reverse Engineering quite difficult because, basically, the code will no longer be written as you wrote (variable names, functions and etc.) and then it is done encoding and optimization of the same.

However, closing the source code does not guarantee 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 tend to own everything that is developed or designed in the work environment. And in such cases not only can you not and should not restrict access to either the application, through software licensing, or to your source code by the aforementioned tools or other competitors.

4

A complement to the existing answer,

try to observe as an "offender". If I were you instead of the person who wants to "steal/copy" the system and modify it to reuse or resell without authorization.

What job would you have in copying?

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

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

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

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

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

Of course there are people in bad faith and dumb people who will copy/steal parts of code or the entire system. Don’t worry about that. 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’ll be passed over.

Working with mediocre people is loss, waste of time.

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

So, in short, make open source code under a license where it does 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 and patent.

With due legal records, you can take legal action against anyone who violates the terms of use. If you judge that a lawsuit is worth taking.

Usually no lawsuit is filed against people with small businesses because the legal cost is higher than a probable indemnity. So basically expect the offender to make a good profit to start a lawsuit. It’s usually won cause. You will receive a good indemnity and may even completely break the offender’s business. Not that it is pleasurable to see the misfortune of others, but because it is just and that is what matters, to be fair.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.