connect
connect($server,$user="",$password="",$iport="",$flag_passive=false,$timeout=-1); - connects to the specified address via FTP connection
The function accepts parameters as input:br>
$server – address connect$user – the username of the connection$password password connection$iport port connection$flag_passive – connection mode (passive or active)$timeout – the maximum time to attempt a connection (in seconds), with -1 to use the system settings (usually 90 seconds). (available from version 4.9.39)
After testing, the function returns the result of its work to the script :
true – connected to the specified address under the specified name false – errors occurred during the connection