By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,157 Members | 1,001 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,157 IT Pros & Developers. It's quick & easy.

Getting at FTP Server Log

P: n/a
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?

Jul 17 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
*Dave wrote:
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?


http://no2.php.net/manual/en/ref.sockets.php

--
Thomas

SELECT date FROM wife WHERE bitching = '0' AND sex = '1'
Jul 17 '05 #2

P: n/a
"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.
Jul 17 '05 #3

P: n/a
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/
Jul 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.