<?php
$file_name = $_GET['file'] . ".apk";
$file_dir = $_SERVER['DOCUMENT_ROOT'] . "\\";
if(!file_exists($file_dir . $file_name)) {
echo "file is not exists";
} else {
$file = fopen($file_dir . $file_name, "r");
header("Content-type: application/vnd.android.package-archive");
header("Accept-Ranges: bytes");
header("Accept-Length: ".filesize($file_dir . $file_name));
header("Content-Disposition: attachment; filename=" . $file_name);
echo fread($file,filesize($file_dir . $file_name));
fclose($file);
exit;
}
?>