Is it possible to hide/encode/encrypt php source code and let others have the system?

PhpEncryptionObfuscation

Php Problem Overview


Is it possible to hide/encode/encrypt the php file/source code, and let others have the system installed and run on their machine?

Php Solutions


Solution 1 - Php

Yes, you can definitely hide/encode/encrypt the php source code and 'others' can install it on their machine. You could use the below tools to achieve the same.

But these 'others' can also decode/decrypt the source code using other tools and services found online. So you cannot 100% protect your code, what you can do is, make it tougher for someone to reverse engineer your code.

Most of these tools above support Encoding and Obfuscating.

  • Encoding will hide your code by encrypting it.
  • Obfuscating will make your code difficult to understand.

You can choose to use both (Encoding and Obfuscating) or either one, depending on your needs.

Solution 2 - Php

There are many ways for doing that (you might want to obfuscate the source code, you can compress it, ...). Some of these methods need additional code to transform your program in an executable form (compression, for example).

But the thing all methods cannot do, is keeping the source code secret. The other party gets your binary code, which can always be transformed (reverse-engineered) into a human-readable form again, because the binary code contains all functionality information that is provided in your source code.

Solution 3 - Php

There are commercial products such as ionCube (which I use), source guardian, and Zen Guard.

There are also postings on the net which claim they can reverse engineer the encoded programs. How reliable they are is questionable, since I have never used them.

Note that most of these solutions require an encoder to be installed on their servers. So you may want to make sure your client is comfortable with that.

Solution 4 - Php

You could just split the frontend and backend. The frontend is hosted on the customers server with an API that makes calls to the backend on your server. This keeps all of the proprietary code proprietary and forces users to sign up / pay for subscriptions.

Solution 5 - Php

There are some online services for obfuscate php to hide the code from others. This is one Right Coder's Free Obfuscator Online

@Glavić is right. "Nothing is bulletproof". You can encode your source code and hide from bigger programmers, not from experts.

Solution 6 - Php

https://toolki.com/en/php-decoder/

Decode hidden PHP eval(), gzinflate(), str_rot13(), str_replace() and base64_decode()

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionNewbieView Question on Stackoverflow
Solution 1 - PhpRohit ChemburkarView Answer on Stackoverflow
Solution 2 - PhpAbrixas2View Answer on Stackoverflow
Solution 3 - PhpSutandionoView Answer on Stackoverflow
Solution 4 - PhpJohn ProestakesView Answer on Stackoverflow
Solution 5 - PhpRana HyderView Answer on Stackoverflow
Solution 6 - PhpAkhila PrakashView Answer on Stackoverflow