ftp_get_option()

It retrieves various runtime behaviours of the current FTP stream

Example

<?php

$ftpId = ftp_connect(‘ftp.phpcodez.com’);

$login_result = ftp_login($ftpId, ‘anonymous’, ‘user@phpcodez.com’);

$disconnect = ftp_get_option($ftpId, FTP_TIMEOUT_SEC);

ftp_close($ftpId);

?>