Cancelled

Creating FTP account in cpanel and DirectAdmin via php

Hi,

I have two PHP scripts

one for CPanel and one for Directadmin to create user account via PHP

The code for Cpanel is

I want to add FTP account in the created new account which will be redirected to /public_html just before the line

echo "Done";

I just would like to know how to do so ?

Now for directadmin the script is like this

$url= "https://$server_login:$server_pass@$server_ip:2222/CMD_API_ACCOUNT_USER?username=$username&email=$email&passwd=$upass&passwd2=$upass&domain=$domain&package=plan&ip=$server_ip&add=Submit&action=create";

$result = file_get_contents($url);

echo "Done";

The same question how to add FTP account in the created new account before echo "Done"; ?

The code of PHP for cpanel is

$whmu = 'whmusername';//can be a reseller with WHM access
$whmp = 'whmpassword';
$whmh = 'host';//ip
$udomain = 'email'; // can be subdomain too
$uname = 'username'; //max 8 characters
$upass = 'userpassowrd';
$uemail = 'useremail';
$uplan = 'the_plan'; //the plan has to exist in WHM
$ncc = "http://{$whmu}:{$whmp}@{$whmh}:2086/scripts/wwwacct";
$add = "?plan={$uplan}";
$add .= "&domain={$udomain}";
$add .= "&username={$uname}";
$add .= "&password={$upass}";
$add .= "&contactemail={$uemail}";
$result = file_get_contents($ncc.$add);

echo "Done";

Skills: PHP, Software Architecture

See more: php ftp account, cpanel ftp, user account , creating question, create cpanel, cpanel add php, ftp add user, domain directadmin, php script echo, echo script php, email cpanel, email ftp, php echo script, email cpanel php, account ftp add, cpanel email script, ftp account cpanel php script, create url submit script, php script user ftp account, ftp script email, directadmin cpanel, php user account, script ftp action, create email account, cpanel create domain script

About the Employer:
( 12 reviews ) muscat, Oman

Project ID: #4960038

2 freelancers are bidding on average $24 for this job

sanabaig

Lets Start Now

$34 USD in 3 days
(31 Reviews)
4.8
acutetech10

Here we like to specify our slogan "A Right Place For Pace". we have ability and tech to close your bid within that target time. we request you to have a glance at our Private Message. we would be glad to know that you More

$13 USD in 0 days
(0 Reviews)
0.0
hAhzCbqTQUCc

Hi we are freelance software developers. If you contact us, we can give a quote and we can discuss further details of the project. w w w . so l v e r . i o

$17 USD in 3 days
(0 Reviews)
0.0