Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 820
Newbie Avatar asked Aug 13 '13 07:08

Newbie


People also ask

Can you hide PHP code?

It is impossible to totally hide the PHP source code since it is an interpreted language, but there are a few possible alternatives: Use a code obfuscator to make the source code difficult to read. Use a code protector or encoder.

How do I protect my PHP source code?

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.

Can anyone see my PHP code?

With a correctly configured web server, the PHP code isn't visible to your website visitors. For the PHP code to be accessible by people who visit your website, the server would have to be configured to display it as text instead of processing it as PHP code.


2 Answers

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.

  • Zend Guard
  • IonCube
  • SourceGuardian
  • phpSHIELD
  • phpBolt (free)

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.

like image 103
Rohit Chemburkar Avatar answered Sep 26 '22 22:09

Rohit Chemburkar


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.

like image 27
Abrixas2 Avatar answered Sep 22 '22 22:09

Abrixas2