API Commands
[All Commands]

Create_Web_Hosting_FTP_Account


Create a new FTP account.

Input:

string ssid token from Login
string webhosting Web Hosting code
string username FTP username
string password FTP password
string dir root directory (optional)
int ftp whether FTP protocol is enabled (optional)
int ssh whether SFTP protocol is enabled (optional)
string permissions read or readwrite (optional)
array ips_allow list of IP addresses that are allowed access to the account (optional)
array ips_deny list of IP addresses that are denied access to the account (optional)

Output:

string status ok | error

Example:


<?php

$client 
= new SoapClient(null, [
    
'location' => 'http://regtons.com/soap/cmd.php',
    
'uri' => 'http://regtons.com/soap'
]);

$login_input = [
    
'login' => 'demo',
    
'password' => 'demouser'
];

$login_output $client->__call('Login', ['data' => $login_input]);

$input = [
    
'ssid' => $login_output['data']['ssid'],
    
'webhosting' => 'NGHTFH',
    
'username' => 'ftpaccount_a',
    
'password' => '********',
    
'dir' => '/',
    
'ftp' => 1,
    
'ssh' => 1,
    
'permissions' => 'read',
    
'ips_allow' => [
        
'1.2.3.4'
    
],
    
'ips_deny' => [
        
'ALL'
    
]
];

$output $client->__call('Create_Web_Hosting_FTP_Account', ['data' => $input]);

print_r($input);
print_r($output);
$input: Array ( [ssid] => 51aca4e95c12821b56a9045babc943e7 [webhosting] => NGHTFH [username] => ftpaccount_a [password] => ******** [dir] => / [ftp] => 1 [ssh] => 1 [permissions] => read [ips_allow] => Array ( [0] => 1.2.3.4 ) [ips_deny] => Array ( [0] => ALL ) ) $output: Array ( [status] => ok )

API Manual - version from 2023-05-12 12:15:50