The ftp_get_option() function returns runtime options of the FTP connection.
Syntax
ftp_get_option(con,option);
Parameters
con − The FTP connection.
option − The runtime option to return.
The following are the possible values −
FTP_TIMEOUT_SEC - The timeout used for network operations
FTP_AUTOSEEK - Returns TRUE if this option is on, FALSE otherwise
Return
The ftp_get_option() function returns the value on success, or FALSE if the given option is not supported.
Example
The following is an example −
<?php $ftp_server="192.168.0.4"; $ftp_user="amit"; $ftp_pass="tywg61gh"; $con = ftp_connect($ftp_server) or die("Could not connect to $ftp_server"); $login = ftp_login($con, $ftp_user, $ftp_pass); echo ftp_get_option($con,FTP_TIMEOUT_SEC); ftp_close($con); ?>