Hi Dan,
You should take a look at our XML-API PHP client class. Its a PHP class that lets you make remote calls to a cPanel system. It's really ease to code with. Pretty much all you have to do is know your credential and the details of the API call you want. There are a few examples in the tarball; below is an example of how to call API2 Ftp::addftp (used to add FTP accounts)
PHP Code:
include("xmlapi.php");
$ip = "10.1.1.1"; //your server IP or name
$xmlapi = new xmlapi($ip); // instantiate the XML-API object
//// If you need root or WHM/reseller level access, set root credentials and use port 2087/2086
//$auth_user = "root";
//$auth_pass = "rootS3creT!";
//$xmlapi->set_port(2087);
//// If you're just authentiating against you cPanel, set cPanel credentials and use port 2083/2082
/// for this example, I'll be "dave"
$auth_user = "dave";
$auth_pass = "daveS3creT!";
$xmlapi->set_port(2083);
//store our auth in object
$xmlapi->password_auth($auth_user, $auth_pass);
//// Optional stuff
// JSON or XML output
$xmlapi->set_output('xml');
// Debugging, great for at the console
$xmlapi->set_debug(1);
//// From API2 documents, this is want input is required by 'addftp' function
/// Ftp::addftp( user, pass, homedir, quota, disallowdot, homedir2 )
$args = array(
'user'=>'ftpuserx@davedomain.tld',
'pass'=>'frc!%2Z2ltD',
'quota'=>20
);
// for any cPanel API1 or API2 query you'll need to say what cPanel account you are affecting
$cpuser = 'dave';
$response = $xmlapi->api2_query($cpuser, 'Ftp', 'addftp', $args);
Checkout the links in my signature and search the forums for PHP XMLAPI and I'm sure you'll find tons of useful info 
Let me know if you have further questions,
-DavidN