I am attempting a work around for some of the scripts that I have and basically is .htaccess able to
1) Generate a log file of what files have been requested when someone enters that folder
2) Then give vales or print the file name in that "log" file
then could a php script
1) look into that log file
2) get the sizes of the files
3) add them up
4) access a SQL datable to a specific table and locate the ID associated to the log file
5) write to a column where taking the original value and then adding the current
6) After that prune the log file.
I can't seem to find the coding for .htaccess to produce the file and log each file access...
I don't know if you can create a log out of a .htaccess file. One option though would be to simply have PHP read your main access log. You could use Grep (or an equivalent PHP function if one exists) to limit the results to files in the directory your concerned about.
Another option would be to install the SQL log module for Apache. This allows for your Apache logs to be stored in a SQL database. In this case your PHP script has a much easier time working with the data since all of the data is already in a database.