Shell File Manager

Current Path : /home/camscanae/www/downloads/
Upload File :
Current File : /home/camscanae/www/downloads/download.php

<?php




// $actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
// $match_link="http://$_SERVER[HTTP_HOST]/camscan/downloads/download.php?file=";
// // print_r($match_link);
// // print_r($actual_link);

// if($actual_link==$match_link){


//  ?>

<!--<div class="card" style="margin:20px">-->
<!--  <div class="card-body">-->
<!--  <center>-->
<!--    <h1 class="card-title"> <strong> Sorry ...!! </strong><br>The Data Does Not Exist</h1>-->
<!--    <p class="card-text">-->
<!--     <img class="img-fluid" alt="empty image" src="../assets/img/website/empty.png">-->
<!--  </center>-->
<!--</p>-->
<!--  </div>-->
<!--</div>-->

//  <?php
    
// }

// if(!empty($_GET['file'])){
//     $fileName = basename($_GET['file']);
//     $filePath = 'files/'.$fileName;
//     if(!empty($fileName) && file_exists($filePath)){
//         // Define headers
//         header("Cache-Control: public");
//         header("Content-Description: File Transfer");
//         header("Content-Disposition: attachment; filename=$fileName");
//         header("Content-Type: application/zip");
//         header("Content-Transfer-Encoding: binary");
        
        
        // Read the file
//         readfile($filePath);
//         exit;
//     }else{
     
//   ?>
   
<!--<div class="card" style="margin:20px">-->
<!--  <div class="card-body">-->
<!--  <center>-->
<!--    <h1 class="card-title"> <strong> Sorry ...!! </strong><br>The Data Does Not Match</h1>-->
<!--    <p class="card-text">-->
<!--     <img class="img-fluid" alt="empty image" src="../assets/img/website/empty.png">-->
<!--  </center>-->
<!--</p>-->
<!--  </div>-->
<!--</div>-->

// <?php
//     }
// }
// ?>




<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <meta content="width=device-width, initial-scale=1.0" name="viewport">

  <title>CamScan FZCO |Downloads</title>

    <script>
        const url = new URL(window.location.href);
        const params = new URLSearchParams(url.search);
        const fileParam = params.get('file');
        console.log(fileParam + "asds")
        const fileUrl = 'https://camscan.ae/downloads/files/' + fileParam;
        const a = document.createElement('a');
        a.href = fileUrl;
        a.target = '_blank';
        a.download = '';
        a.click();
        window.location.replace('https://camscan.ae');
    </script>
  <?php

  include('../include/header.php');

  ?>

</head>
<?php
$name= $_GET['file'];

    header('Content-Description: File Transfer');
    header('Content-Type: application/force-download');
    header("Content-Disposition: attachment; filename=\"" . basename($name) . "\";");
    header('Content-Transfer-Encoding: binary');
    header('Expires: 0');
    header('Cache-Control: must-revalidate');
    header('Pragma: public');
    header('Content-Length: ' . filesize($name));
    ob_clean();
    flush();
    // readfile("files/".$name); //showing the path to the server where the file is to be download
    exit;
?>


Shell File Manager Version 1.1, Coded By Shell
Email: [email protected]