Chung Leong wrote:
"Dave" <ca***@yahoo.com> wrote in message
news:11**********************@c13g2000cwb.googlegr oups.com... I've built a Web-based FTP client in PHP and now have a need to
display the text responses from the FTP server (the stuff that
appears in the FTP log like "Welcome to the FTP server. You are user
number 45.") Anybody know how I would use PHP to do this?
How do you use a web-based FTP client if you don't might me asking. I
mean, any downloaded files would still be, eh, at the server side.
Well I supposed your script could download the files to the server and
they could then download them from the server to local computer using
an http request but then why not just get them to use an ftp client on
the local machine?
Also, each page load has to be a completely separate FTP transaction ie
log in then change working directory / list working directory / get
file then logout. There's no way to keep that FTP session running
inbetween page requests.
To answer the OP's question, I don't think there's any way to get the
output from the FTP server using the built in FTP functions so you'd
need to connect using sockets and pass commands yourself and then read
the output.
http://www.php.net/fsockopen
--
Chris Hope - The Electric Toolbox -
http://www.electrictoolbox.com/