PHP ftp_mdtm() Function

The ftp_mdtm() function returns when the specified file was last modified.

ftp_mdtm — Returns the last modified time of the given file.

int ftp_mdtm ( resource $ftp_stream , string $remote_file )

ftp_mdtm() gets the last modified time for a remote file.

Example -

ParameterDescription
ftp_streamThe link identifier of the FTP connection
remote_fileThe file from which to extract the last modification time

Returns the last modified time as a Unix timestamp on success, or -1 on error.