A little correction to king_killa at juggalos4life dot com's note, it isn't ftp_res, it's ftp_size.By the way, here is a complete function that will get all the files on a server, then write them to a array.<?php$ftp1 = ftp_connect('ftp.nowhere1230404.foo') or die("Couldn't connect to server");ftp_login($ftp1,'foo','bar');ftp_pasv($ftp1, TRUE); echo "Collecting Files on Neodecoder<br>";$dir = "";function filecollect($dir,$filelist) {global $ftp1; $files = ftp_nlist($ftp1,$dir); foreach ($files as $file) { $isfile = ftp_size($ftp1, $file); if($isfile == "-1") { $filelist = filecollect($dir.'/'.$file,$filelist,$num); } else { $filelist[(count($filelist)+1)] = $file; }}return $filelist;}$filelist = filecollect($dir,$filelist);echo "<pre>";print_r($filelist);echo "</pre>";?>This is really handy if your trying to transfer all the files from a ftp server to another server. Which, is why I made the script in the first place. heh..