I am trying to include encrypt and decrypt option in my PHP program. Actually I am looking to encrypt the cPanel server remote key before storing to database and then decrypt it so then I can use cPanel API. Is there any option available for this purpose?
You need to check whether Mcrypt module installed in your PHP or not. You can use that function, because it supports more than 10 crypt algorithms. You will also find standard modules in PHP manual about Mcrypt.
Will you feel secure, if someone is able to read your database but not you PHP scripts? Encryption in the database is useless if your PHP scripts have the ways to decrypt automatically. You should put the key into your PHP script and encrypt it lot with ioncube. Its not totally unbreakable, but it is better than anything else.
For PHP source code I know the Source-Guardian is the best option available at free of cost so that is not my actual concern. What I wan to do, encrypt and decrypt data in MySQL database.
As you looking for to protect the data in the database then you should consider encrypted file systems with secure protection to the code that reads and writes data to the database. You also need to understand the fundamental limitations to what it possible with all the PHP libraries being as an open-source.