File manager - Edit - /home/autoph/public_html/connectv1/resources/views/asa_v1/asav1download.php
Back
<?php // Start output buffering to prevent accidental output ob_start(); if (isset($_GET['download'])) { // Define the path to the file $filePath = __DIR__ . '/../../../dist/AUTOHUB_CONNECT-release.apk'; // Check if the file exists if (!file_exists($filePath)) { // If the file does not exist, show an error message header("HTTP/1.0 404 Not Found"); echo "File not found!"; exit; } // Get the file name $fileName = basename($filePath); // Set headers to force download header('Content-Description: File Transfer'); header('Content-Type: application/vnd.android.package-archive'); // MIME type for APK files header('Content-Disposition: attachment; filename="' . $fileName . '"'); header('Content-Transfer-Encoding: binary'); header('Expires: 0'); header('Cache-Control: must-revalidate'); header('Pragma: public'); header('Content-Length: ' . filesize($filePath)); // Clear output buffer and flush ob_clean(); flush(); // Read the file and send it to the user readfile($filePath); exit; } // End output buffering ob_end_flush(); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Download APK</title> <style> body { font-family: Arial, sans-serif; text-align: center; margin-top: 100px; } .download-btn { background-color: #4CAF50; /* Green */ border: none; color: white; padding: 15px 32px; text-align: center; text-decoration: none; display: inline-block; font-size: 16px; cursor: pointer; border-radius: 5px; } .download-btn:hover { background-color: #45a049; } </style> </head> <body> <h1>Download the old ASA APK installer</h1> <p>Click the button below to download Old ASA the APK file:</p> <a href="?download=true" class="download-btn">Download APK</a> </body> </html>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings