cPanel® Blog

Developing with LiveAPI

In earlier versions of cPanel, developers included a script called LivePHP. This technology is essentially an internal window on the server to make API 1 and API 2 calls to the local machine via a socket to cpsrvd. Through LivePHP, you could use API functions through API tags and our Remote XML or JSON API. This is the suggested best practice for accessing cPanel functionality from your Plugins for reasons of simplification and also reducing network overhead.

Where previously the Live environment only included PHP, we have now expanded it to include multiple languages, Ruby, Python, Perl, as well as PHP; and have renamed it LiveAPI.

cPanel ships with example scripts for both PHP and Perl. Both scripts can be found in the x3 directory (/usr/local/cpanel/base/frontend/x3/) of your cPanel installation. The scripts are named test.live.php and test.live.pl.

For reading about specific module usage for LiveAPI, please see our documentation. Or if you have usage questions along the way, please feel free to post in our developer forums where we have dedicated cPanel development staff available to help.