$this->prepCurl(); //execute the request (the login) $html = $this->login(); $this->processHtml($html); } public function login() { //Set the URL to work with curl_setopt($this->curl, CURLOPT_URL, $this->loginUrl); //Set the post parameters curl_setopt($this->curl, CURLOPT_POSTFIELDS, $this->queryString); return curl_exec($this->curl); } public function processHtml($html) { $this->dom->loadHTML($html); file_put_contents('logs/downloader.log', print_r($this->dom, 1)); } } /** * Parser has following syntax: * * php system/Console/parser.php TRN 2013-12-12 * * @TODO I guess we could make date optional and get current date by default. * */ ini_set('memory_limit', '-1'); $downloader = new Downloader($argv); $downloader->start();