Current Location: Home> Function Categories> ftp_ssl_connect

ftp_ssl_connect

Open a secure SSL-FTP connection.
Name:ftp_ssl_connect
Category:Uncategorized
Programming Language:php
One-line Description:Open a secure SSL-FTP connection.

Definition and usage

The ftp_ssl_connect() function opens a secure SSL-FTP connection.

When the connection is open, you can run the FTP function on the server.

Example

This example attempts to connect to an FTP server. If the connection fails, the die() function terminates the execution of the script and outputs a message:

 <?php
$conn = ftp_ssl_connect ( "ftp.testftp.com" ) or die ( "Could not connect" ) ;
?>

grammar

 ftp_ssl_connect ( host , port , timeout )
parameter describe
host

Required. Specifies the FTP connection to be used (the identifier of the FTP connection).

Can be a domain name or an IP address. This parameter cannot contain "ftp://" or slashes.

port Optional. Specifies the port of the FTP server. The default is 21.
timeout Optional. Specifies the timeout time for the FTP connection. The default is 90 seconds.
Similar Functions
Popular Articles