2-bizzy
Verified User
Now, I have this script:
If I run this script the error result is 0, but there's no package created in DA.
What's wrong with this script?
PHP:
function DACreatePackage($da_packagename,$da_bandwith,$da_quota,$da_vdomains,$da_nemails) {
$socket = new HTTPSocket;
$socket->connect($c_da_ip,2222);
$socket->set_login($c_da_username,$c_da_password);
$socket->set_method('POST');
if($da_nemails == "0") {
$socket->query('/CMD_API_MANAGE_USER_PACKAGES',
array(
'packagename' => $da_packagename,
'bandwith' => $da_bandwith,
'quota' => $da_quota,
'vdomains' => $da_vdomains,
'nsubdomainschecked' => 'checked',
'nemailschecked' => 'checked',
'nemailfchecked' => 'checked',
'nemailmlchecked' => 'checked',
'nemailrchecked' => 'checked',
'mysqlchecked' => 'checked',
'domainptr' => '5',
'ftpchecked' => 'checked',
'aftpchecked' => '',
'cgichecked' => 'checked',
'sslchecked' => 'checked',
'sshchecked' => '',
'dnscontrolchecked' => 'checked',
'suspendatlimitchecked' => 'checked',
'add' => 'Save'
));}
$result = $socket->fetch_body();
return $result;
}
If I run this script the error result is 0, but there's no package created in DA.
What's wrong with this script?