| 
<?php
//  Here is a quick example of how to use the class, read the top of the class file for
 //  the complete list of functions.  Some functions do not return errors (due to cpanel not returning errors)
 //  Bear in mind that some functions may take awhile for cpanel to execute (like add addon domain), so it may
 //  not be the best idea to wait for a response.
 
 include('cPanelTools.php');
 $cpanel = new cPanelTools('username','password','example.com');
 // create email address
 $errors = $cpanel->emailCreate('[email protected]','mypass');
 if(empty($errors)){
 echo 'Email Address was Created!';
 }else{
 echo 'There was an error<br>';
 print_r($errors);
 }
 
 // delete email (without bothering to collect the errors)
 $cpanel->emailCreate('[email protected]');
 
 // Create subdomain
 $cpanel->domainCreatedSub('testing','example.com');
 ?>
 |