Today, I have created another class for creating subdomains in cPanel account. This class will be very helpful who wants to provide auto subdomain creations for their users. User will ask to enter desired subdomain. The script will either create it or will inform that it is already exists.
To use this class, open example.php in the attachment and change this line to suite your environmnet
Upload the script to your website and run example.php. Hope it should work fine.