0

is there any way to secure your whole code ? or some important files. which is not changeable to other even it is deployed to other servers like client's server.

or we can create any DLL file(which is not changeable) which can be run by Apache server and authenticate the requirements.

  • 6
    The best way to secure your code is to not share it with others – apokryfos Jan 11 '18 at 09:44
  • no, Because PHP is parsed at run-time, therefor the server must be able to read it. And thus you cannot effectively encrypt it. You can make it hard to read, but Ultimately the server has to have it in plain text at some point. For example you could compile it into a `.phar` file, this will make it difficult for someone to modify. It depends if you mean make it hard to change, or make it hard to read. – ArtisticPhoenix Jan 11 '18 at 09:44
  • If short answer **No You can't.** – Abdulla Nilam Jan 11 '18 at 09:45
  • Probably the best solution is a RESTfull server, if it's possible to do that, where you distribute a client, but keep the application code private. – ArtisticPhoenix Jan 11 '18 at 09:48
  • 1
    Rewrite any part of your application in [zephir-lang](https://zephir-lang.com/), then compile it to an C extension, that will prevent changes, and unless the user can access the server as root, no way to decompile the code. – Lawrence Cherone Jan 11 '18 at 10:03

0 Answers0