automatic cpanel account creation with php

grumble

Registered
Aug 17, 2005
3
0
151
hi everyone,
Ive just recently signed up for a reseller account, that came with WHM. My host gave whmautopilot away for free, So I tried that, hated it and decided to create new accounts via php instead. Ive finished reading Cpanels accounting php module http://www.cpanel.net/remoteaccess-php.html, and it wasnt very easy to understand( huge understatement).

What I want to do (create accounts) I understood to be something like this--

require '/usr/local/cpanel/Cpanel/Accounting.php.inc';
$host = "localhost";
$user = "me";
$accesshash = '';

if ($newaccount=createacct ($host,$user,$accesshash,$usessl,$acctdomain,$acctuser,$acctpass,$acctplan))
{ print "new account created";}


however Ive read some posts saying that for createacct the variables are not in the correct order. Also that $acctuser cant have numbers in it etc.

Does accesshash stand for that really long whm key? Can someone walk me through the variables, telling me what each one stands for? and any limitations etc, and most importantly the correct format eg. for $acctdomain is it www.domain.com or just domain.com? thanks for your help! :D