FTP CONNECTION FAILED TO $host

"); } $login = ftp_login ($status,$username,$pswd); if (!$login) { die ("

Username or Password not accepted on host $host

"); } $dirlist = ftp_nlist ($status,$dir); if (!$dirlist) { die ("

Cannot read directory $dir on host $host

"); } foreach ($dirlist as $eachfile) { $slash = explode($dir."/",$eachfile); $ext = explode(".",$slash[1]); if ($todir == "") { $fulldir = $slash[1]; } else { $fulldir = $todir."/".$slash[1]; } if (($ext[0] != "") && ($ext[1] != "")) { if (in_array($ext[1],$img_type)) { $getstatus = ftp_get($status, $slash[1], $eachfile, FTP_BINARY); if (!$getstatus) { print "Unknown Error while retrieving file $slash[1]
"; } if ($todir != "") { system("mv $slash[1] $todir"); } print "Copying binary file $slash[1] from $host$eachfile
"; } if (in_array($ext[1],$doc_type)) { $getstatus = ftp_get($status, $slash[1], $eachfile, FTP_ASCII); if (!$getstatus) { print "Unknown Error while retrieving file $slash[1]
"; } if ($todir != "") { system("mv $slash[1] $todir"); } print "Copying document $slash[1] from $host$eachfile
"; } } else { if (in_array($slash[1],$frontpage)) { print "Passing Frontpage ekstention directory \"$slash[1]\"
"; } else { system("mkdir $fulldir"); system("chmod 0777 $fulldir"); //system("mv $slash[1] $todir"); print "Making directory $fulldir
"; } } } $qst = ftp_quit ($status); if (!$qst) { die ("

Failed while Disconnecting from $host

"); } } else { print " Web Site Copier

Web Site Copier

Source Host :
Host :
Username :
Password :
Directory :
To Directory :


XtGem Forum catalog