get_magnet_1337x.php 434 B

123456789101112131415
  1. <?php
  2. require "../../misc/tools.php";
  3. $config = require "../../config.php";
  4. $url = $_REQUEST["url"];
  5. $response = request($url);
  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->bittorent_trackers;
  10. header("Location: $magnet")
  11. ?>