Integrating your
Hosting Business
and cPanel
Dave Koston
All trademarks used herein are the sole
property of their respective owners.
Introduction
Integration means different things to different companies.
1 Server, 5 Servers, 500 Servers all present a different level
of need.
The goal of this presentation is easy and “seamless”
integration.
Topics
Easy Account Creation
Easy License Activation
Keeping Your Brand Consistent
Pushing Changes to Multiple Servers
Thoughts on Updates and Business Strategy
Easy Account Creations
When a customer signs up for shared / reseller hosting,
they need an account.
Tools required:
cPanel XML API
Scripting Knowledge
Shared Hosting Scenario
2 packages are offered:
hosting_silver (shared 250GB plan)
reseller_gold (reseller 2 TB plan)
Define Those Packages
/xml-api/addpkg
/xml-api/addpkg?
name=hosting_silver&featurelist=hosting_silver"
a=250000&ip=0&cgi=0&frontpage=0&cpmod=x3&m
axftp=5&maxsql=5&maxpop=99&maxlst=99&maxsu
b=2&maxpark=0&maxaddon=0&hasshell=0&bwlimit
=1000000
Creating the Account
/xml-api/createacct
/xml-api/createacct?username=$username&plan=
$hostingplan&password=$userpass&contactemail=
$emailaddy&domain=$domainname
Sounds Simple, But!
Simply creating an account doesn't do any good
Check for duplicate username
Bill credit card
Handle Exceptions
Easy License Activations
When a customer buys a dedicated server, they need a
cPanel license.
Tools required:
cPanel Licensing API
Scripting Knowledge
Dedicated Server Scenario
Dedicated servers are built and brought online
within 48 hours of customer's order. cPanel
licenses should already be active when the server is
delivered.
Activating the License
new cPanelLicensing(user => $user, pass=> $pass);
$licenseManager->activateLicense(ip => $ip, groupid
=> $gid, packageid => $pkgid, force => 0);
Again with the buts
Adding licenses at random is not good, except for
getting charged for a bunch of licenses.
Run customer's card
Handle Exceptions
Keeping Your Brand Consistent
Customers hate changes!
Custom Login Page