![]() |
Available news archives:
comp.lang.tcl
-
comp.lang.python
-
comp.security.firewalls
-
sci.crypt -
comp.lang.php -
comp.lang.javascript
|
|
comp.lang.php archiveFile Download Counter
From: Marius III <thegentleman@webmail.co.za>
Date: Sun Oct 30 2005 - 01:53:58 CEST
Hi there,
I am building a File download counter in PHP5.
It's working fine but the problem is that its not working with any Download
How can I correct this?
-----------------CODE BEGIN-------------------
$path = $download_dir."/".$filename;
if (file_exists($path)) {
$count++;
$file = fopen($counter_dir."/".$filename.".txt", "w");
$size = filesize($path);
header("Content-type: application/octet-stream");
readfile($path);
-----------------CODE END-------------------
Thanks alot!
|