summaryrefslogtreecommitdiff
path: root/download.php
diff options
context:
space:
mode:
Diffstat (limited to 'download.php')
-rw-r--r--download.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/download.php b/download.php
new file mode 100644
index 0000000..c40ee2d
--- /dev/null
+++ b/download.php
@@ -0,0 +1,10 @@
1<?php
2$file_names = ['win' => 'rustdesk.bat', 'deb' => 'rustdesk.sh', 'arch' => 'rustdesk.sh'];
3$scripts = ['win' => 'scripts/rustdesk.bat', 'deb' => 'scripts/rustdesk-deb.sh', 'arch' => 'scripts/rustdesk-arch.sh'];
4
5header("Content-Type: application/octet-stream");
6header('Content-Disposition: attachment; filename="' . $file_names[$_GET['os']] . '"');
7header('Content-Length: ' . filesize($scripts[$_GET['os']]));
8
9readfile($scripts[$_GET['os']]);
10exit; \ No newline at end of file