2 adams[AT]techweavers[DOT]net:
To get a size of large file (f. ex.: 3.2 Gb) you have to format the result returned by ftp_size():
$size = sprintf ("%u", ftp_size($connection, $file_name));
So you can get the real size of big files. But this method is not good for checking is this a dir (when ftp_size() returns -1).