How to protect source code of PHP !!!

Bhullarz's Avatar
Skilled contributor
Is there any way that we can protect the source code written in PHP? we know php is rendered to HTML/Javascript on client side. But what if somebody have access to your PHP scripts? Can we still save our source code ?
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
You can encrypt and keep them in binary formats.

There are lots of paid scripts which comes in encrypted format like Kayako support scripts
Bhullarz's Avatar
Skilled contributor
PHP scripts in binary format will run as normal as simple scripts run or we have to use special methods to execute such scripts in binary format ?
Hex00010's Avatar, Join Date: Jul 2009
Go4Expert Member
Shabbir is correct you can encrypte php code for exampel when some ppl use shells they encrypt it base_64 why? most servers admins are getting smart and setting up scripts to where the server scans for strings inside the server and it will detect it

so they encrypt it to bypass that method

But even that be if the person that wants your php script and its encrypted and is smart enough he can easily decrypt it so either way securing php script by encrypting it will never be safe it will only block the ones that are not smart enough