|  | Re: Retreiving Stats from site by Abraham Chaffin on May 23, 2008 at 6:23:30 pm |
You could use a modified version of the hit counter in this post:
http://forums.creativecow.net/thread/191/855970#855975
Only at the end of the end of the file do a redirect to the file you want them to download using this code (replace http://www.creativecow.net with the location of your file:
header("Location: http://www.creativecow.net"); exit;
Full thing would look like this:
<?
$filename='mycounter.txt';
if(!is_file($filename)){
file_put_contents($filename,'1');
}
$count=file_get_contents($filename);
$count++;
file_put_contents($filename,$count);
header("Location: http://www.creativecow.net"); exit;
?>
The only other way to do this is if you have direct access to the server log files or a program is installed that does then you could track it from that program. Ask your ISP about such a program.
Abraham
Respond to this post • Return to posts index | |