Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
ftp_ssl_connect() function in PHP
The ftp_ssl_connect() function opens a secure SSL-FTP connection.
Syntax
ftp_ssl_connect(host,port,timeout);
Parameters
host − The FTP server address. Can be a domain address or an IP address.
port − The port to connect to. Here the default is 21.
timeout − The timeout for network operations.
Return
The ftp_ssl_connect() function returns a SSL-FTP stream on success or FALSE on error.
Example
The following is an example −
<?php
$ftp_server = "192.168.0.4";
$ftp_user = "jacob";
$ftp_pass = "tywg61gh";
$ftp_conn = ftp_ssl_connect($ftp_server) or die("Could not connect to $ftp_server");
$login = ftp_login($ftp_conn, $ftp_user, $ftp_pass);
// close SSL connection
ftp_close($ftp_conn);
?>Advertisements