Is it possible to encode a php script that can't be decoded or at least the most secure way?
preguntado el 24 de agosto de 12 a las 00:08
Yes, but the PHP script will not be able to encode and decode itself. You would need to write another program to do it on behalf of the PHP script. However, you can obfuscate the text using the combination of
eval. This allows you to insert code so that someone cannot do a simple Ctrl+F search for a function that may be foreign. For example this is "Hello World":
This applies to the content of the PHP code, not the file.
You mean that you want to distribute your code, but not let anyone else read / decompile it.
Zend write PHP, so the best place would be to consider using their encoder for this purpose: http://www.zend.com/en/products/guard/ You can also add licencing to the distribution.
There are others out there that obfuscate code - but obfuscation doesn't stop people copying it and, in many cases, won't stop someone from editing it if they really want to.