Connect To Ftp Server Php

[Solved] Connect To Ftp Server Php | Php - Code Explorer | yomemimo.com
Question : connect to ftp server php

Answered by : tumelo

$host= 'ftp.example.com';$user = 'notarealusername';$password = 'notarealpassword';$ftpConn = ftp_connect($host);$login = ftp_login($ftpConn,$user,$password);// check connectionif ((!$ftpConn) || (!$login)) { echo 'FTP connection has failed! Attempted to connect to '. $host. ' for user '.$user.'.';}else{ echo 'FTP connection was a success.'; $directory = ftp_nlist($ftpConn,''); echo ''.print_r($directory,true).'';}ftp_close($ftpConn);

Source : https://www.hashbangcode.com/article/connect-ftp-server-using-php | Last Update : Fri, 13 Mar 20

Answers related to connect to ftp server php

Code Explorer Popular Question For Php