The PHP Function Ftp_SSL_Connect
PHP provides a built-in function that opens a secure SSL-FTP connection to an FTP server. This connection can then be used to run FTP functions against the server. This function is only available if the ftp module is enabled and the OpenSSL support is built statically into PHP.
The ftp_ssl_connect() function takes a host, port and timeout parameter. The host should be a domain or an IP address. This value shouldn't be prefixed with ftp:// and shouldn't have any trailing slashes. The port should be an integer between 1 and 21. The timeout is the maximum time in seconds that PHP will allow for network operations. If it is not set then the default is 90 seconds.
If a timeout is not set or the ftp_ssl_connect() fails to connect to an FTP server then it will return a False. The ftp_close() function is not deprecated and can be used to close the FTP connection. If you attempt to use an FTP connection that is closed then PHP will raise a ValueError exception.
In PHP 8.1, the ftp_connect() and ftp_ssl_connect() functions have been migrated to class objects. This is part of PHP's Resource to Object Migration Plan. In order to make this change less disruptive, all functions that previously returned or accepted a ftp_connection object now accept the new FTP