ftp_connection::check_response

Description

Checks to see if the desired response code was returned.

Syntax

bool ftp_connection::check_response (int $desired)



Parameter $desired

Expected type: Enumerated Integer
Description: The desired response code or an array of desired response codes

Possible integer values
Allowed values Description
125 Data connection already open; transfer starting
150 File status ok; about to open data connection
200 Command ok
220 System ready for new user
226 Closing data connection
227 Entering passive mode
230 User logged in, proceed (ie the password was correct)
250 File command okay, completed
257 "PATHNAME" (eg, a file or folder) created
331 Username okay, requires password



Return value

Expected type: Boolean
Description: True if the desired response code (or one of the desired response codes) was returned, false otherwise.


Notes

  • Only the response codes used by SMF are documented here
  • $desired can also be an array of integers
  • See http://www.faqs.org/rfcs/rfc959.html for a complete list
Advertisement: