#!/usr/bin/php setAuth($nick, $pass); $di = new DirectoryIterator($dir); foreach ($di as $f) { if ($f->isDot()) { continue; } echo $f->getFilename() . ' '; $id = $client->uploadFile($f->getPathname(), $folder); echo " $id \n"; } ?>