diff options
| author | polo <contact@ordipolo.fr> | 2026-08-20 01:00:43 +0200 |
|---|---|---|
| committer | polo <contact@ordipolo.fr> | 2026-08-20 01:00:43 +0200 |
| commit | 5dd7d08390b0c3c5732bc8629258e718cea31dd8 (patch) | |
| tree | b5bcf7abe97dc26c13a1059c6d25fbd8edd670ed /download.php | |
| parent | bfdd14f0ad318be4622c9b07fd30f686f8c523d5 (diff) | |
| download | rustdesk-scripts-5dd7d08390b0c3c5732bc8629258e718cea31dd8.tar.gz rustdesk-scripts-5dd7d08390b0c3c5732bc8629258e718cea31dd8.tar.bz2 rustdesk-scripts-5dd7d08390b0c3c5732bc8629258e718cea31dd8.zip | |
les téléchargements fonctionnent
Diffstat (limited to 'download.php')
| -rw-r--r-- | download.php | 10 |
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 | |||
| 5 | header("Content-Type: application/octet-stream"); | ||
| 6 | header('Content-Disposition: attachment; filename="' . $file_names[$_GET['os']] . '"'); | ||
| 7 | header('Content-Length: ' . filesize($scripts[$_GET['os']])); | ||
| 8 | |||
| 9 | readfile($scripts[$_GET['os']]); | ||
| 10 | exit; \ No newline at end of file | ||
