How do I track file downloads

前端 未结 8 2066
予麋鹿
予麋鹿 2020-12-08 03:35

I have a website that plays mp3s in a flash player. If a user clicks \'play\' the flash player automatically downloads an mp3 and starts playing it.

Is there an eas

8条回答
  •  轮回少年
    2020-12-08 04:18

    If your song / binary file was served by apache, you can easily grep the access_log to find out the number of downloads. A simple post-logrotate script can grep the logs and maintain your count statistics in a db. This has the performance advantage by not being in your live request code path. Doing non-critical things like stats offline is a good idea to scale your website to large number of users.

提交回复
热议问题