get_magnet_1337x.php 474 B

12345678910111213141516
  1. <?php
  2. require_once "../../misc/tools.php";
  3. $config = require_once "../../config.php";
  4. $url = $_REQUEST["url"];
  5. $response = request($url, $config->curl_settings);
  6. $xpath = get_xpath($response);
  7. $magnet = $xpath->query("//main/div/div/div/div/div/ul/li/a/@href")[0]->textContent;
  8. $magnet_without_tracker = explode("&tr=", $magnet)[0];
  9. $magnet = $magnet_without_tracker . $config->bittorrent_trackers;
  10. header("Location: $magnet")
  11. ?>