Reputation: 53
I need to encrypt my php file from preventing viewing others.I am the only guy to decrypt it also.Is there any method in php to decrypt and encrypt a file using some secret key ??
Thanks in advance.
Upvotes: 2
Views: 684
Reputation: 46
you can try Zend Guard. http://www.zend.com/en/products/guard/
php commercial encryption software.
Upvotes: 0
Reputation: 287
Unfortunately there is no way to do this. I'm guessing you still want the file to be executeable on the server? In that case in the very least the server needs to be able to decrypt it and therefore have the key anyway. So anyone who is able to access the server will still be able to decrypt the file.
You can encrypt it like any other file, but that would make it unusable as a PHP-file.
Upvotes: 1