<? /* __
// .-----.-----.-. .-.-----.--| |-----.-----.-----.-----.
// |__ --| - | |_| | | _ | .__| - _| - | |
// |_____|_____|_____|__|__|_____|__| |_____|_| |_|_|||_|
// . ..: 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 = "counters/"; //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 "<font face=$textfont size=2>";
echo "<center><br><br>That file [<b>$get$extension</b>] is not available for download.<br>";
echo "Please contact the server administrator <a href='mailto:$SERVER_ADMIN'>$SERVER_ADMIN</a>.";
?>
|
|