..:: Chris Claremont ::..
// .-----.-----.-. .-.-----.--| |-----.-----.-----.-----.
// |__ --| - | |_| | | _ | .__| - _| - | |
// |_____|_____|_____|__|__|_____|__| |_____|_| |_|_|||_|
// . ..: s o u n d r e a m o r g a n i z a t i o n :.. .
// . ..Coding Division.. .
//
// PHP Script..: Download Counter
// Made By.....: |The-Crow| - thecrow@impulsive.org
// Site........: http://soundream.planet-d.net
*/
//--------------------------------------------------------//
// PLEASE DEFINE THE VARIABLES //
//--------------------------------------------------------//
$extension = ".zip"; //leave this blank if you have various extensions.
$counterdir = "../public/"; //change this if you want other directory for the counter files.
$textfont = "Verdana,Arial"; //text font for the error msg
//--------------------------------------------------------//
// DO NOT EDIT ANYTHING FROM HERE //
//--------------------------------------------------------//
if (file_exists("$get$extension"))
{
header("location: $get$extension"); // download the file [download.php?get=name_of_file]
$file = fopen("$counterdir/$get$extension.txt","r+"); // download counter
$count = fread($file, filesize("$counterdir/$get$extension.txt"));
fclose($file);
$count += 1;
$file = fopen("$counterdir/$get$extension.txt","w+");
fputs($file, $count);
fclose($file);
}
else
echo "
Il file [$get$extension] è momentaneamente offline o copmunque non è disponibile per il download. ";
echo "Per favore contattate il webmaster per segnalargli l'errore.";
?>