private function parsePage($path) { $entries = []; $response = $this->guzzle->get(Client::BASE_URL . $path); $dom = new SimpleHtmlDom($response->getBody()); $rows = $dom->find('table[id=ctl00_phBody_acdgEventHistory] tr'); foreach ($rows as $row) { $columns = $row->find('td'); if (count($columns) === 3) { $entries[] = $this->parseRow($columns); } } return $entries; }
private function getLoginFields() { $fields = []; $response = $this->guzzle->get(self::BASE_URL); $dom = new SimpleHtmlDom($response->getBody()); $form = $dom->find('form[id=loginForm]', 0); foreach ($form->find('input') as $input) { $fields[$input->name] = $input->value; } $fields['txtUserName'] = $this->username; $fields['txtPassword'] = $this->password; $fields['JavaScriptTest'] = 1; $fields['cookieTest'] = 1; return $fields; }