Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use this? Getting an error on shared server. #2

Open
nom3d opened this issue Aug 31, 2019 · 1 comment
Open

How to use this? Getting an error on shared server. #2

nom3d opened this issue Aug 31, 2019 · 1 comment

Comments

@nom3d
Copy link

nom3d commented Aug 31, 2019

I uploaded these files to my shared hosting account and trying to get a list of the accounts on my WHM. Would be nice if there were some examples and more info on how to use this.

Fatal error: Cannot declare class PreviewTechs\cPanelWHM\WHMClient, because the name is already in use in

@John-Henrique
Copy link

You just use this

$whmClient = new WHMClient("YOUR_USER_WHM","YOUR_TOKEN_FROM_WHM", "IP_OR_DOMAIN_FROM_WHM", 2087 );
$accounts = new Accounts($whmClient);

$account = new Account();

$account->setUser( 'chooseUser' );
$account->setDomain( 'chooseDomain.com' );
$account->setEmail( '[email protected]' );
$account->setPassword( 'TH3p433w0rD' );
$account->setPlanName( 'PLAN_FROM_WHM' );

$account = $accounts->create( $account );

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

No branches or pull requests

2 participants