Development Guides Home >> Guide to the LiveAPI System >> LiveAPI Methods
Guide to the LiveAPI System - The end() Method
The end()
method deconstructs the Cpanel::LiveAPI
object and closes the connection to cPanel & WHM.
- Only use this method once in any script or application.
- Use this method after you have completed all of the actions that require a connection to cPanel & WHM.
Important:
- For Perl applications, this method is required .
- For PHP applications, this method is not required . We provide this method for backwards compatibility with LivePHP scripts.
Example
LiveAPI PHP Class
// Disconnect from cPanel - only do this once.
$cpanel->end();
LiveAPI Perl Module
# Disconnect from cPanel - only do this once.
$cpanel->end();
Parameters
This method does not accept parameters.
Returns
This method does not return a value.