see files/folders on remote ftp server

i have successfully connected

how to see what files/folders are on the remote ftp server


<?php
error_reporting(E_ALL);

$host='';
$user='';
$password='';

//Connect to the FTP server
$ftpstream = ftp_connect($host);

//Login to the FTP server
$login = ftp_login($ftpstream, $user, $password);
if($login) {
  //We are now connected to FTP server.
  echo 'connected';
}else{
  echo 'what happened';
}

//Close FTP connection
ftp_close($ftpstream);

Open in new window

LVL 1
rgb192Asked:
Who is Participating?
 
Loganathan NatarajanLAMP DeveloperCommented:
try with ftp_rawlist() function

ref. http://php.net/manual/en/function.ftp-rawlist.php
0
 
rgb192Author Commented:
Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.