Class :: cPanel Subdomain V2

Class :: cPanel Subdomain V2

This is the 2nd edition of my previous Class cPanel Subdomains Creator. Using this script you can create cPanel subdomain & FTP account for this subdomain without logging into cPanel. Let your user create their own subdomains and FTP accounts for that subdomain. Users will get access only to newly created subdomain not to the root directory. So your contents will be secure.

To use this script you must have access to cPanel.

Open exaple.php file and change the red marked values as your environment.

$cpanel=new cpsubdomain("cPanel User","cPanel Pass","Domain","cPanel Theme");

For example:

$cpanel=new cpsubdomain("mysite","12345","","x");

Now change the Quota for each FTP account. To do this simply change the red marked value.

echo $cpanel->createFTP($_POST['subdomain'],$_POST['ftppass'],"20");