update ftp.php

Added setPassiveMode method for changing FTP passive mode to on or off. In passive mode, data connections are initiated by the client, rather than by the server. It may be needed if the client is behind firewall.
Added try catch block to getConnection method for catching connection failure to FTP server.