requests = array( new PirateBayRequest($opts, $mh), new _1337xRequest($opts, $mh), new NyaaRequest($opts, $mh), new RutorRequest($opts, $mh), new SukebeiRequest($opts, $mh), new TorrentGalaxyRequest($opts, $mh), new YTSRequest($opts, $mh), ); } public function parse_results($response) { $results = array(); foreach ($this->requests as $request) { if ($request->successful()) $results = array_merge($results, $request->get_results()); } $seeders = array_column($results, "seeders"); array_multisort($seeders, SORT_DESC, $results); return $results; } public static function print_results($results, $opts) { echo "
There are no results. Please try different keywords!
"; return; } foreach($results as $result) { $source = $result["source"]; $name = $result["name"]; $magnet = $result["magnet"]; $seeders = $result["seeders"]; $leechers = $result["leechers"]; $size = $result["size"]; echo "