Store each time a file is accessed in a database? So a combination of of PHP and mySQL.
So you record when it happened, what the IP address is and for reference the file they tried downloading. You'd probably want to keep the directory of files outside of the webtree as well, so people cannot directly link to it (and so would need to access your php scripts to get the file)
So you record when it happened, what the IP address is and for reference the file they tried downloading. You'd probably want to keep the directory of files outside of the webtree as well, so people cannot directly link to it (and so would need to access your php scripts to get the file)