Skip to content
This repository has been archived by the owner on Sep 6, 2020. It is now read-only.

how to create DB or Email account Using Cpanel-php ? #22

Open
sayjeyhi opened this issue Mar 26, 2017 · 1 comment
Open

how to create DB or Email account Using Cpanel-php ? #22

sayjeyhi opened this issue Mar 26, 2017 · 1 comment

Comments

@sayjeyhi
Copy link

Hi ,

Excuse if my question is not so good question , but I am looking a way to create DB in cpanel with api .

Can I create DB or Email account Using Cpanel-php ?
thanks

@sayjeyhi
Copy link
Author

I find my answer , I should use cpanel method , with MysqlFE Module and createdb function.

$cpanel = new \Gufy\CpanelPhp\Cpanel([
	'host'        =>  'http://site.com:2082', // ip or domain complete with its protocol and port {2087 :whm - 2082 : cpanel}
	'username'    =>  'username', // username of your server, it usually root.
	'auth_type'   =>  'password', // set 'hash' or 'password'
	'password'    =>  'somePassword', // long hash or your user's password
]);


$accounts = $cpanel->cpanel('MysqlFE', 'createdb' , 'username' , array('db' => 'database') ); // it will returned as array

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant