cookie = array('lang' => 'english'); if (stripos($link, '://filereactor.com') !== false) $link = str_replace('://', '://www.', $link); $this->page = $this->GetPage($link, $this->cookie); is_present($this->page, "The file you were looking for could not be found"); is_present($this->page, "No such file with this filename", 'Error: Invalid filename, check your link and try again.'); is_present($this->page, "The file was removed by administrator"); if ($_REQUEST["premium_acc"] == "on" && ((!empty($_REQUEST["premium_user"]) && !empty($_REQUEST["premium_pass"])) || (!empty($premium_acc["filereactor_com"]["user"]) && !empty($premium_acc["filereactor_com"]["pass"])))) { $this->Login($link); } else { $this->FreeDL($link); } } private function FreeDL($link) { if (empty($_POST['step']) || $_POST['step'] != '1') { $page2 = cut_str($this->page, 'Form method="POST" action=\'', ''); //Cutting page $post = array(); $post['op'] = cut_str($page2, 'name="op" value="', '"'); is_notpresent($post['op'], 'download', 'Error parsing download post data.'); $post['usr_login'] = (empty($this->cookie['xfss'])) ? '' : $this->cookie['xfss']; $post['id'] = cut_str($page2, 'name="id" value="', '"'); $post['fname'] = cut_str($page2, 'name="fname" value="', '"'); $post['referer'] = ''; $post['method_free'] = cut_str($page2, 'name="method_free" value="', '"'); $page = $this->GetPage($link, $this->cookie, $post); if (preg_match('@You can download files up to \d+ [K|M|G]b only.@i', $page, $err)) html_error("Error: ".$err[0]); if (preg_match('@You (?:(?:have to)|(?:must)) wait (?:\d+ \w+,\s)?\d+ \w+ (?:un)?till? (?:your )?next download@', $page, $err)) html_error("Error: ".$err[0]); $page2 = cut_str($page, '