Connecting Tech Pros Worldwide Help | Site Map

Getting at FTP Server Log

Dave
Guest
 
Posts: n/a
#1: Jul 17 '05
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?

Thomas
Guest
 
Posts: n/a
#2: Jul 17 '05

re: Getting at FTP Server Log


*Dave wrote:
[color=blue]
> 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?
>[/color]

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

--
Thomas

SELECT date FROM wife WHERE bitching = '0' AND sex = '1'
Chung Leong
Guest
 
Posts: n/a
#3: Jul 17 '05

re: Getting at FTP Server Log


"Dave" <cayem@yahoo.com> wrote in message
news:1103223815.010505.113930@c13g2000cwb.googlegr oups.com...[color=blue]
> 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?[/color]

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.


Chris Hope
Guest
 
Posts: n/a
#4: Jul 17 '05

re: Getting at FTP Server Log


Chung Leong wrote:
[color=blue]
> "Dave" <cayem@yahoo.com> wrote in message
> news:1103223815.010505.113930@c13g2000cwb.googlegr oups.com...[color=green]
>> 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?[/color]
>
> 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.[/color]

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/
Closed Thread