Well i have modified this script a bit so here it is:
<?php
//if they do not put a get file error out
if(!$_GET['file'])
{
echo 'Enter a file.';
exit;
}
//For security we add a code
if($_GET['code'] != "BAH!")
{
echo 'Provide code.';
exit;
}
//Located file:
$local_file = $_GET['file'];
// filename that the user gets as default
$download_file = $_GET['file'];
// set the download rate limit => 20,5 kb/s
$download_rate = 20.5;
//now download the file
if(file_exists($local_file) && is_file($local_file))
{
// send headers
header('Cache-control: private');
header('Content-Type: application/octet-stream');
header('Content-Length: '.filesize($local_file));
header('Content-Disposition: filename='.$download_file);
// flush content
flush();
// open file stream
$file = fopen($local_file, "r");
while(!feof($file))
{
// send the current file part to the browser
echo fread($file, round($download_rate * 1024));
// flush the content to the browser
flush();
// sleep zero second(s) giving a delay of 0 second(s) to download file.
sleep(0);
}
// close file stream
fclose($file);
}
else
{
//if the file does not exist tell them.
die('Error: The file '.$local_file.' does not exist!');
}
?>
Now the orifinal author is here:
http://www.jonasjohn.de/snippets/php/file-download.htm
This will help you to stop going into your cpanel to download a file, you could also update a upload function to it so u will never need to go into your cpanel to edit a file.