use CMD_API_MANAGE_USER_PACKAGES

ccharlet

New member
Joined
Oct 5, 2005
Messages
2
Hy,

It's possible to use this command for create a new package ?

If I execute this command
http://domain:2222/CMD_API_MANAGE_USER_PACKAGES

This message appears

error=1&text=Use these api commands for listing data&details=CMD&#95API&#95PACKAGES&#95RESELLER CMD&#95API&#95PACKAGES&#95USER


Tanks for your help
Cédric
 
API is used for outside creation of package user and such

you have to use api with example php

you cant direct link your browser to an api link

you should'nt use http://www.yourdomain.com:2222/CMD_MANAGE_USER_PACKAGES

if you wanna use API you have to do it from a php file like create_package.php

and the file will look a bit like this :

Code:
$socket = new HTTPsocket;
$socket->connect(yoururl, 2222);
$socket->set_login(yourDAusername, Yourpass);
$socket->query('/CMD_API_MANAGE_RESELLER_PACKAGES',
    array(
        'add' => 'save',
        'aftp' => 'OFF',
        'cgi' => 'ON',
        'dns' => 'OFF',
        'dnscontrol' => $dnscontrol,
        'bandwith' => $bandwith, 
        'domainptr' => $nb_domaine,
	'ftp' => 'unlimited',
        'ips' => '0',
	'mysql' => $nb_bd,
	'nemailf' => 'unlimited',
	'nemailml' => 'unlimited',
	'nemailr' => 'unlimited',
	'nemails' => 'unlimited',
	'nsubdomains' => 'unlimited',
	'quota' => $hd_space, 
	'serverip' => 'ON',
	'ssh' => 'OFF',
	'userssh' => 'OFF',
	'ssl' => 'ON',
	'vdomains' => 'unlimited',
	'packagename' => 'test'));
$result = $socket->fetch_body();

more info about directadmin API can be found here :

http://www.directadmin.com/api.html

Doditz

Reliable French hosting since 2000
 
Last edited:
Back
Top