downloads.mdb
Introduction
Statistics in the internet are very difficult. At best you can do intelligent estimates and read out tendencies. It is almost impossible to get absolute numbers from server logfiles.
»But downloads are different. All you have to do is count them. Isn't it?«
You can of course count the clicks onto a downloadlink or a button. But all you get this way are clicks, not downloads. Who can say whether a visitor waited to the end of a larger file or cancelled the download?
»Well, then we will check the logfile, which contains the files downloaded.«
Correct, but what if somebody use a download manager? Such a program will split the download into smaller bites, download these simultaneously, if possible, and thus make downloads faster. But each bite gets a separate entry in the server log. Must we turn on our pocket calculators now? Of course not.
Database
Downloads.mdb by blechtrottel brodaktschns tackles this very problem. It is an Access-2000 database which counts the downloads in a server log. It counts downloads per day for a certain file from an ip-address. Thus, it can count downloads with download managers, as it relies on the sum total for an ip-address.
Limits
- Should a download stretch over midnight into a new day, it would not be detected with this method, it would be counted as two incomplete downloads on two different days and be dropped from the statistics.
- If a user starts a download e.g. on a laptop in a network (office, WLAN) and continues this download in another network (at home, in another WLAN), this download cannot be detected, because usually the ip-address will change as well.
- The same holds true for interrupted downloads on a computer without a constant internet connection. Here too, the pc will get a new ip-address when connecting.
- On the other hand it may happen that e.g. in an internetcafé several persons start downloading a file but do not finish it. The total may count one or more downloads, for the server logs the computer only, it knows nothing of the persons using it.
Preliminary Remarks
To work with downloads.mdb you need access to your serverlog. If you are not sure, ask your provider.
Our database works with logfiles in Common Logfile Format (CLF) only and was tested in a German Access only. Should it not work with your CLF logs, please send us about ten lines from your log, so we can adapt it.
Access 2000 must apply an txt extension to the logs, to work with them. If you should not like that, change the extension back again. Downloads.mdb does not make any changes to the content of your logfiles!
Usage
- Before you open the database, create a file named downloads.txt in a folder of your choice. In this file add a line for all the downloads you want to count:
name;path/from/root/filename;bytes
For example:IE4;download/ie4.zip;789270
- At the moment, the database supports German and English. You can select one of them in a dropdown field named Sprache/Language. If you want to translate the database into another language, please send us a word list. This list you can find as a table in downloads.mdb called Texte.
- Click the button Ändern/Select next to the field Downloads and select the file downloads.txt you created. Now select the logfile for your website by pressing the second button labelled Select/Ändern and after a short while you should see a result similar to our screenshot.
- If, like blechtrottel brodaktschns, you have a logfile for each month, you do not need the button Calculate/Auswerten. But if you have only one logfile, which keeps growing, you have to use this button (or start the database anew).
Download
You can download the database as downloadsmdb.zip. It contains a testdownloads.txt and a testtransfer.log, too.
Final Remarks
- Our database has successfully been counting the downloads for our projects for a year now. These projects are all hosted on Apache servers, we could therefore not test it with other servers' logs. Please send feedback.
- The database has not been locked or protected. If you know your way in Access, you can adapt it to your personal needs. Comments are welcome anytime.
- The statistics you can create with downloads.mdb (and similar programs and services) are about as acurate as the circulation figures for a newspaper. No one can say how many readers a newspaper really has, several people may share one copy while some other copies end up in the bin unread. And even if we could count downloads exactly, we still would not know if the files are actually used ...




