From 281bcaf36d9a3ca3830e10c2d67bf4d210ec630a Mon Sep 17 00:00:00 2001 From: kobayashi90 Date: Thu, 6 Feb 2025 00:27:16 +0000 Subject: [PATCH] Initial Upload #1 --- downloads.php | 149 ++++++++++++++++++++++++++++ index.php | 269 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 418 insertions(+) create mode 100644 downloads.php create mode 100644 index.php diff --git a/downloads.php b/downloads.php new file mode 100644 index 0000000..2eb6871 --- /dev/null +++ b/downloads.php @@ -0,0 +1,149 @@ + + + + + + + + SquidDebrid - Download Ready + + + + + + + + + + +
+
+
+
+

Your Files are Ready!

+ + Back to Home +
+
+
+
+ + + + + \ No newline at end of file diff --git a/index.php b/index.php new file mode 100644 index 0000000..cf7162b --- /dev/null +++ b/index.php @@ -0,0 +1,269 @@ + $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 + +
  • + +
+
+ +
+
+ +
+ +
+
+
+
+ + + + + \ No newline at end of file