Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

see files/folders on remote ftp server

Posted on 2012-09-18
2
Medium Priority
?
279 Views
Last Modified: 2012-09-19
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

0
Comment
Question by:rgb192
2 Comments
 
LVL 36

Accepted Solution

by:
Loganathan Natarajan earned 2000 total points
ID: 38412812
try with ftp_rawlist() function

ref. http://php.net/manual/en/function.ftp-rawlist.php
0
 
LVL 1

Author Closing Comment

by:rgb192
ID: 38416179
Thanks
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to implement server side field validation and display customized error messages to the client.
This holiday season, we’re giving away the gift of knowledge—tech knowledge, that is. Keep reading to see what hacks, tips, and trends we have wrapped and waiting for you under the tree.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Suggested Courses

569 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question