Reputation: 1753
Is it possible with php
FTP to get or retrieve the welcome message the server sends?
Something like this you get from FTP clients
Status: Connection established, waiting for welcome message...
Response: 220 Welcome to the OpenDreambox FTP service.
Plus is it possible to get the response code like 220 in that case? Are they even FTP standards those codes?
Upvotes: 4
Views: 783
Reputation: 34105
I don't think you can do it with the ftp_* functions, but there's an alternative approach:
$socket = fsockopen("ftp.microsoft.com", 21);
echo fgets($socket); //read the welcome line
fclose($socket);
Upvotes: 3