About CMD_SHOW_USER_PACKAGE

coblyox

New member
Joined
Oct 28, 2009
Messages
4
Hello,

I wan't to ask why my script does not work? It don't add package..

PHP:
<?php
$da['host'] = '127.0.0.1';
$da['port'] = '2222';
$da['user'] = 'useris';
$da['pass'] = 'passwordas';


include 'httpsocket.php';
function kuriamPlana($dahost,$dauser,$dapass,$da_packagename,$da_bandwith,$da_quota,$da_vdomains,$da_nemails) {
$socket = new HTTPSocket; 

$socket->connect($dahost,2222); 
$socket->set_login($dauser,$dapass); 

$socket->set_method('GET');
if($da_nemails == "0") {
$socket->query('/CMD_SHOW_USER_PACKAGE',
    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;
    }
	
	
kuriamPlana($da['host'],$da['user'],$da['pass'],'betkoks','200','200','2','0');

?>
 
Can someone help?? :/
PHP:
include 'httpsocket.php';
function kuriamPlana($user,$pass) {
$socket = new HTTPSocket; 

$socket->connect("ssl://127.0.0.1",2222); 
$socket->set_login("$user", "$pass"); 

$socket->set_method('POST');
$socket->query('/CMD_API_MANAGE_USER_PACKAGES',
    array(
        'packagename' => 'betkoks', 
        'bandwith' => '1000',
        'quota' => '1000',
        'vdomains' => '2', 
        '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;
    }  
	
	
kuriamPlana($useris, $passwo);

I don't understand why he don't create package... Tryed "CMD_API_MANAGE_USER_PACKAGES" and "CMD_SHOW_USER_PACKAGE", but still no actions.. Could someone help me how to start it normal? Because i really need it, please.

P.S. DirectAdmin using SSL
 
Last edited:
Back
Top