<?php
 
header('Content-Type:application/json; charset=utf-8');

if (strlen($_SERVER['QUERY_STRING']))
$re =writeLog($_SERVER['QUERY_STRING']);


$file_name="video-editor.exe"; 

$path=$file_name;

$arr=pathinfo($file_name);

$name=$arr['filename'];

$name.=".".$arr['extension'];
 
 


$file_length = filesize($path);
header("Content-transfer-encoding: binary");
header('Content-Disposition: attachment; filename='.$name); //ÕâÀïÖØÃüÃû
header('Content-Length:'.$file_length);
header("Content-Type: application/octet-stream");
readfile($path);
 
function writeLog($msg)
{
    $logFile = date('Y-m-d').'.txt';
    $msg = date('Y-m-d H:i:s').' >>> '.$msg."\r\n";
    return file_put_contents($logFile,$msg,FILE_APPEND );
}


?>