Protecting/encyrpting PHP code
HI Guys,
Im just new in PHP but i already tried this thing work in our office.
What my main concern is anybody can be the code i made in php once he access the server. Is there a way to protect my code inside the server so that other cannot easily copy the one I done already?
Thanks.
Re: Protecting/encyrpting PHP code
There are PHP bytecode compilers and obfuscators that make it very tricky to get anything useful from the code. However, using that means that the server is set up to deal with it. If it is, then it's probably either a proper commercial server, where it would be a gross violation of security setup and customer separation if anyone else could just read your code, or it is your own server which you set up correctly, in which case no user you don't trust should ever have access anyway.
In other words, if someone has access to your code, you have bigger worries than the guy having access to your code.
Re: Protecting/encyrpting PHP code
Ok thanks for the tip.
Do this sample encryptor by the way available in the web as a freeware?
Just want to try something. But I hope using this doesn't affect the performance of the Php code I created.
Thanks again
Re: Protecting/encyrpting PHP code
Re: Protecting/encyrpting PHP code
Oww!! thanks for the link!
Very informative discussion.
Thanks again!
Re: Protecting/encyrpting PHP code
In reality, though, the only time you might need to protect PHP code is when you want to ship something as a commercial framework. By that time, you'll be able to afford the full Zend Studio with all the byte code compiling it offers.
Re: Protecting/encyrpting PHP code
Compiling to byte code also has the advantage of making it faster and more efficient. This is however negated if you run PHP as a module because the compiled scripts are cached in memory while the server is running.