Page 1 of 1

How to encrypt the code in PHP

Posted: Tue Mar 23, 2010 12:51 am
by syamswaroop
hi all,
I want to know how to encrypt the code in PHP.
and what are all the tools (free) available and which is the best one to use.
Will web server will be able to run the encrypted code?


Thanks,
sam

Re: How to encrypt the code in PHP

Posted: Tue Mar 23, 2010 1:05 am
by naffan
md5("your password")

is that mean?

Re: How to encrypt the code in PHP

Posted: Tue Mar 23, 2010 1:09 am
by syamswaroop
what i want is to encrypt the whole file so that others will not use it?

Re: How to encrypt the code in PHP

Posted: Tue Mar 23, 2010 1:16 am
by naffan
for example:
crypt
$str ="this is my name";
$temp=crypt($str);
echo $temp;

Re: How to encrypt the code in PHP

Posted: Tue Mar 23, 2010 2:08 am
by Griven
Encrypted PHP code cannot be executed by the server. In addition, there is no need to encrypt your PHP code, as the code itself is never shown to your website's users. The only thing that they will see is the HTML that is output to their browser.

If you want to encrypt the PHP files for offline storage, you may want to look into a program like TrueCrypt.