public function connect() { require_once 'class-ftp.php'; $this->ftp = new ftp(false); if (!$this->ftp->connect($this->options['host'])) { $this->ftp->PushError('connect', "Could not connect to host"); return false; } if (!$this->ftp->login($this->options['user'], $this->options['pass'])) { $this->ftp->PushError('auth', "Authentication failed"); return false; } return true; }