How to log attachment downloads?

Started by Nils Johan, April 24, 2006, 05:37:14 AM

Previous topic - Next topic

Nils Johan

To be able to create detailed reports of downloaded media files from our site I need to log the activity in the attachment directory of my SMF forum. I need to see when the files have been completely downloaded and by which IP.

Currrently I can of course see the grand total of attempted downloads but also get a detailed report by extracting the lines containing "http://www.example.com/smf/index.php?action=dlattach;topic=... [nofollow]" from the apache logs.
The problem is that this will still only give me the number of attempted downloads and no information about how much of the file that was actually downloaded. The files downloaded from the /smf/attachments/ directory is never appearing in my server's web logs. (Because they are requested by SMF and not via http?)

Does anyone have an idea about how to create a log over the file transfer activities in the attachment directory including ip, time, URL/filename, http status and size?

Nils Johan

Would this be possible at all by modifying or adding to the SMF scripts or do I need to do something with the apache webserver?

Advertisement: