HEX
Server: Apache
System: Linux srv4.garantili.com.tr 4.18.0-477.21.1.lve.1.el8.x86_64 #1 SMP Tue Sep 5 23:08:35 UTC 2023 x86_64
User: ekspardev (1006)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //home/ekspardev/www/nokta-logo.ekspar.dev/php/download.php
<?php
if (isset($_GET['type']) && ($_GET['type'] === 'alis' || $_GET['type'] === 'satis')) {
    $file = $_GET['type'] === 'alis' ? 'converted-alis.xml' : 'converted-satis.xml';
    
    if (file_exists($file)) {
        header('Content-Description: File Transfer');
        header('Content-Type: application/octet-stream');
        header('Content-Disposition: attachment; filename="'.basename($file).'"');
        header('Expires: 0');
        header('Cache-Control: must-revalidate');
        header('Pragma: public');
        header('Content-Length: ' . filesize($file));
        readfile($file);
        exit;
    } else {
        echo "Dosya bulunamadı.";
    }
} else {
    echo "Geçersiz istek.";
}