This morning I developed a PHP class that will do the following:
Create/Remove Addon Domains
Create/Remove Parked Domains
Create/Remove MySQL Databases
Create/Remove Mail Accounts
Create/Remove FTP Accounts
Create/Remove Subdomains
Generate Full Backup
I have not yet developed any documentation for it yet, but if you look at the code it is self-explanatory. Example usage to create a subdomain would be:
This will not output or return anything. It will just simply load the page that creates the subdomain on the server-side so the client will not see your username or password. It's actually that simple to create a subdomain automatically. I'm not sure if it will work on all servers but it's worth a try. The class file is attached to this post. Please rename it to class.cpanel.php.
Update: In case of an error, this script will not throw an error. If you are using this, please update it immediately.
Create/Remove Addon Domains
Create/Remove Parked Domains
Create/Remove MySQL Databases
Create/Remove Mail Accounts
Create/Remove FTP Accounts
Create/Remove Subdomains
Generate Full Backup
I have not yet developed any documentation for it yet, but if you look at the code it is self-explanatory. Example usage to create a subdomain would be:
PHP:
<?php
include("class.cpanel.php");
$cuser = "username";
$cpass = "password";
$cdomain = "domain.com";
$cpanel = new cpanel($cuser,$cpass,$cdomain);
$cpanel->CreateSubDomain("sub",$cdomain);
?>
Update: In case of an error, this script will not throw an error. If you are using this, please update it immediately.
Attachments
-
4 KB Views: 2,233
Last edited: