Um, so you're asking if you can trigger some action based on access?
There might be other web server options, but the basic options are to have your cgi program serve the file (but do it smart, Content-Length/Content-Range ...) or you can parse your webserver log files.