$url]); if ($response['status'] === 'success') { $filename = $response['data']['filename'] ?? basename($url); // Extract filename from API response $download_links[] = [ 'filename' => $filename, 'url' => $response['data']['link'] ]; } else { $error = $response['error']['message'] ?? 'Failed to process one or more URLs.'; } } } if (!empty($download_links)) { $_SESSION['download_links'] = $download_links; header('Location: download.php'); exit; } } elseif (isset($_POST['torrent']) || isset($_FILES['torrent_file'])) { // Handle torrent/magnet link or .torrent file upload if (!empty($_POST['torrent'])) { $torrent_link = trim($_POST['torrent']); $upload_response = upload_torrent_magnet($torrent_link); } elseif (!empty($_FILES['torrent_file']['tmp_name'])) { $torrent_file = $_FILES['torrent_file']['tmp_name']; $upload_response = upload_torrent_file($torrent_file); } else { $error = 'Please enter a valid torrent/magnet link or upload a .torrent file.'; } if (isset($upload_response)) { if ($upload_response['status'] === 'success') { $torrent_id = $upload_response['id']; $status_response = get_torrent_status($torrent_id); if ($status_response['status'] === 'success') { $torrent_files = $status_response['files']; } else { $error = $status_response['error']; } } else { $error = $upload_response['error']; } } } } } ?> SquidDebrid

Download Your Files

Files in Torrent/Magnet:

    $host_data): ?>
  • Online Offline