public function connect($host, $ssl = false, $port = 21, $timeout = 90)
    {
        if ($ssl) {
            $this->connection = @ftp_ssl_connect($host, $port, $timeout);
        } else {
            $this->connection = @ftp_connect($host, $port, $timeout);
        }

        if ($this->connection == null) {
            throw new Exception('Unable to connect');            
        } else {
            return $this;
        }
    }
public function connect($host, $ssl = false, $port = 21, $timeout = 90)
    {
        if ($ssl) {
            $this->connection = @ftp_ssl_connect($host, $port, $timeout);
        } else {
            $this->connection = @ftp_connect($host, $port, $timeout);
        }

        if ($this->connection == null) {
            throw new Exception('Unable to connect');            
        } else {
            return $this;
        }
    }
public function connect ( $ host , $ ssl = false , $ port = 21 , $ timeout = 90 ) { if ( $ ssl ) { $ this -> connection = @ ftp_ssl_connect ( $ host , $ port , $ timeout ) ; } else { $ this -> connection = @ ftp_connect ( $ host , $ port , $ timeout ) ; } if ( $ this -> connection == null ) { throw new Exception ( 'Unable to connect' ) ; } else { return $ this ; } }
Opens a FTP connection

@param string $host
@param bool $ssl
@param int $port
@param int $timeout

@return FTPClient
Opens a FTP connection