PHP ftp_site() Function

The ftp_site() function sends an FTP SITE command to the FTP server.

bool ftp_site ( resource $ftp_stream , string $command )

ftp_site() sends the given SITE command to the FTP server.

SITE commands are not standardized, and vary from server to server. They are useful for handling such things as file permissions and group membership.

Example -

ParameterDescription
ftp_streamThe link identifier of the FTP connection
commandThe SITE command. Note that this parameter isn't escaped so there may be some issues with filenames containing spaces and other characters.

Returns TRUE on success or FALSE on failure.