File Directory Php

download.php
------------
//
//The download directory where the files are placed!
//A trailing slash is a must!
//
$dloadsdir = '/files/'
//Counter
$counter = 'count.txt';
$cf = fopen($counter, "w+");
fputs($cf, "$_GET['file']");
fclose($cf);
//Core
$file = $_GET['file'];
$fp = fopen($file,"rb");
$fsize = filesize($file);
header("Content-type: application/download \r \n");
header("Content-length: $fsize \r \n");
fpassthru($fp);
fclose($fp);
//EOF
?>