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 get_results() { $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) { echo "
"; if (empty($results)) { 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 "
"; echo ""; echo "$source"; echo "

$name

"; echo "
"; echo "SE: $seeders - "; echo "LE: $leechers - "; echo "$size"; echo "
"; } echo "
"; } } ?>