Control Over fopen Timeout When Opening Via FTP

evetenrig

New Member
I realize that there are other more straightforward ways to conduct FTP. However, I have a specific need to be able to use fopen on a file via FTP. The following code works just great:\[code\]$FTP="ftp://$FTPUser:$FTPPass@$FTPHost/$file_dest";$fp=fopen($FTP, 'w');\[/code\]The problem is when the path of the $file_dest is invalid. For example if $file_dest="1/2/3/test.txt".If the 1, 2, or 3 folders do not exist, then it takes 90 seconds for the fopen to fail.How can I reduce this timeout?
 
Back
Top