specifying a package name in creating a cpanel account thru xmlapi

niceboy

Active Member
Sep 29, 2011
41
1
58
cPanel Access Level
Root Administrator
Hi,

How to specify a package name in creating a cpanel account thru xmlapi?

I get error "Sorry, you must choose a package." when I use sample php xmlapi account creation script..

I'm trying this on a reseller account and specified everything correctly like host/username/pass/etc.

How to tell the script that I want to use 'resell_plan1' package with this account creation?

Code:
include_once '../xmlapi.php';

$ip = getenv('REMOTE_HOST');
$root_pass = getenv('REMOTE_PASSWORD');

$xmlapi = new xmlapi($ip);
$xmlapi->password_auth("root",$root_pass);

$xmlapi->set_debug(1);

$acct = array( username => "someuser", password => "pass123", domain => "thisdomain.com");
print $xmlapi->createacct($acct);
thank you.