We have a new documentation site for cPanel & WHM! You can find our new documentation site at docs.cpanel.net.

We will continue to maintain our API documentation on this server.

Child pages
  • Guide to the LiveAPI System - The new() Method
Skip to end of metadata
Go to start of metadata



The new() method instantiates the Cpanel::LiveAPI object.

  • Only use this method once in any script or application.
  • Use this method before you perform any actions that require a connection to cPanel & WHM.


LiveAPI PHP Class

// Connect to cPanel - only do this once. 
$cpanel = new CPANEL();

LiveAPI Perl Module

# Connect to cPanel - only do this once.


This method does not accept parameters.


This method returns a LiveAPI object.