download the file [download.php?get=name_of_file] */ $path = $download_dir.'/'.$HTTP_GET_VARS['get']; $watcherip = $_SERVER['REMOTE_ADDR']; if(file_exists($path)) { $file = fopen($counter_dir.'/'.$HTTP_GET_VARS['get'].'.txt','r+'); $count = fread($file,100); fclose($file); // closes file $count++; $file = fopen($counter_dir.'/'.$HTTP_GET_VARS['get'].'.txt','w'); // opens file again with 'w'-parameter fwrite($file, $count); fclose($file); $file = fopen($counter_dir.'/'.$HTTP_GET_VARS['get'].'2.txt','a'); $thistime = time(); fputs($file , "\n".$watcherip." ".strftime("%T %d.%m.%Y",$thistime)); fclose($file); $size = filesize($path); header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename='.$HTTP_GET_VARS['get']); header('Content-Length: '.$size); readfile($path); }else{ echo ""; echo "