mirror of
https://github.com/myronblair/epic-download
synced 2026-06-30 17:51:00 -05:00
auto-commit for f3b04df9-f563-4cb2-9a0a-69756e09f838
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
/**
|
||||
* Download Deployment Packages
|
||||
*/
|
||||
|
||||
if ($method === 'GET') {
|
||||
if ($id === 'php-package') {
|
||||
// Serve PHP/cPanel package
|
||||
$file = '/app/cpanel_php/epic-travel-php-cpanel.zip';
|
||||
|
||||
if (!file_exists($file)) {
|
||||
jsonResponse(['error' => 'PHP package not found'], 404);
|
||||
}
|
||||
|
||||
header('Content-Type: application/zip');
|
||||
header('Content-Disposition: attachment; filename="epic-travel-php-cpanel.zip"');
|
||||
header('Content-Length: ' . filesize($file));
|
||||
readfile($file);
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($id === 'list') {
|
||||
jsonResponse([
|
||||
'packages' => [
|
||||
[
|
||||
'name' => 'PHP/cPanel Package',
|
||||
'description' => 'Standard cPanel hosting with PHP & MySQL (No SSH/Python required)',
|
||||
'size' => '790 KB',
|
||||
'download_url' => '/api/download/php-package',
|
||||
'requirements' => ['PHP 7.4+', 'MySQL 5.7+', 'cPanel', 'FTP/File Manager access']
|
||||
]
|
||||
]
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
jsonResponse(['error' => 'Invalid download endpoint'], 404);
|
||||
Reference in New Issue
Block a user