/** * Starts the download * * @author Art <*****@*****.**> * @return bool Whther the download was successful (on the cURL side) */ function download() { if (file_exists($this->dest)) { unlink($this->dest); } $this->fp = fopen($this->dest, 'w'); $this->curl->setopt(CURLOPT_FILE, $this->fp); $this->curl->exec(); fclose($this->fp); $errno = $this->curl->errno(); if ($errno === CURLE_OK) { return true; } else { _echo($this->curl->error()); return false; } }