Cpanel api php (ftp hesapı oluşturmak) cpanel ftp create account

Cpanel api php (ftp hesapı oluşturmak) cpanel ftp create account


indirmek için [dm]110[/dm
daha fazla bilgi burada http://docs.cpanel.net/twiki/bin/view/ApiDocs/Api1/

set_port(2083);
$xmlapi->password_auth($cpuser,$cppass);
$xmlapi->set_debug(1);
$xmlapi->set_output('array');//set this for browser output

$acct = array( username => "someuser", password => "pass123", domain => $db_host);
$a=$xmlapi->createacct($acct);
print_r( $a);

include("xmlapi.php"); */

$ip = "localhost";
$root_user = "";
$root_pass = "";
$cpuser = "";

$xmlapi = new xmlapi($ip);
$xmlapi->password_auth( $root_user, $root_pass );
$xmlapi->set_output('xml');
$xmlapi->set_port(2083);
$xmlapi->set_debug(1);

//Ftp::addftp( user, pass, homedir, quota, disallowdot, homedir2 )
$args = array( 'ftpuser1', 'pass1', '../testdir1', '', '', 'testdir1' );

//those are create homedir: /home/$cpuser/testdir1
//the third variable is relative to /home/$cpuser/public_html
//the sixth variable is relative to /home/$cpuser
// as far as I know, you'll need to provide both for cPanel and the FTP
// sub-system to function properly.

$xmlapi->api1_query($cpuser, 'Ftp', 'addftp', $args);
?>