Description

This function returns the FTP port.

Examples 




https://hostname.example.com:2083/cpsess##########/execute/Ftp/get_port



$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
 
// Check the server's FTP port number.
$ftp_server = $cpanel->uapi(
    'Ftp', 'get_port'
);

 



my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
 
# Check the server's FTP port number.
my $ftp_server = $cpliveapi->uapi(
    'Ftp', 'get_port',
);

 



<!-- Check the server's FTP port number. -->
[% execute( 'Ftp', 'get_port' ); %]

 



uapi --user=username Ftp get_port



{  
   "messages":null,
   "errors":null,
   "status":1,
   "metadata":{  

   },
   "data":{  
      "port":21
   }
}



Parameters

This function does not accept parameters.

Returns

ReturnTypeDescriptionPossible valuesExample
portintegerThe FTP port.

A positive integer that represents a port number.

Generally, this function returns port 21


21