Alright well, I connect to 3 different ip's when I run this script.
It copys files from directorys and downloads them to the website.
I'm having a slight problem with two of them ip's...
I have turned on ftp passive but it still seems to come back as bool(false)
Updating server 1
bool(false)
Warning: ftp_get() [function.ftp-get]: Filename cannot be empty in updater.php on line 42
Warning: ftp_get() [function.ftp-get]: Error opening in updater.php on line 42
Updated cache...
bool(false)
Warning: ftp_get() [function.ftp-get]: Filename cannot be empty in updater.php on line 60
Warning: ftp_get() [function.ftp-get]: Error opening in updater.php on line 60
BZh9rE8PUpdated maps...
Updating server 2
bool(false)
Warning: ftp_get() [function.ftp-get]: Filename cannot be empty in updater.php on line 103
Warning: ftp_get() [function.ftp-get]: Error opening in updater.php on line 103
Updated cache...
bool(false)
Warning: ftp_get() [function.ftp-get]: Filename cannot be empty in updater.php on line 121
Warning: ftp_get() [function.ftp-get]: Error opening in updater.php on line 121
BZh9rE8PUpdated maps...
Updating server 3
array(1) { [0]=> string(36) "1ba90fa2e972b50cdaa6bb23c403296b.dua" } Updated cache...
array(8) { [0]=> string(6) "graphs" [1]=> string(22) "sb_Forlorn_sb3_R2L.bsp" [2]=> string(17) "sb_gooniverse.bsp" [3]=> string(22) "sb_lostinspace_rc5.bsp" [4]=> string(19) "sb_new_worlds_2.bsp" [5]=> string(22) "sb_Spacewar_SB3_V1.bsp" [6]=> string(21) "sb_twinsuns_fixed.bsp" [7]=> string(10) "soundcache" } Updated maps...
. Part of the script:
ftp_pasv($conn, true);
ftp_chdir($conn,"$DIR/maps/");
$files = ftp_nlist($conn,"*.*");
var_dump($files);
chdir('sandbox/cache/');
for($i=0;$i<count($files);$i++){
if(!ftp_is_dir($files[$i])){
usleep(500000);
if(!file_exists($files[$i])){
ftp_get($conn,$files[$i],$files[$i],FTP_ASCII);
}
}
}
echo "Updated cache...<br />";