Table of Contents
Download Settings
Settings for the download class will also be divided into sub-sections. And as on the other pages, the prefix $this-> for the properties will again be omitted for better readability:
Database Settings
This is where your download counters reside, and this section will very likely be subject to future enhancements (as e.g. define the columns you want to use). For now, you can configure the following details:
| Property | Description | Default |
|---|---|---|
| db["host"] | On which machine the database to use is running | "localhost" |
| db["database"] | Name of the database to use | "webstat" |
| db["user"] | The "login" for the database. This user requires permission to select/insert/update rows | "guest" |
| db["pass"] | The corresponding password for the database | "guest" |
| db["table"] | Which table holds all the data? | "downloads" |
Miscellaneous Settings
Well, that's everything else again - or call it the "essential settings": Define how bots should be handled, and whether you want to use the statistic gathering stuff at all. And, of course, what files you never want to serve - even if they are found in your download directories:
| Property | Description | Default |
|---|---|---|
| ignorefile | In the ignorefile you can define user agents (one per line, by a significant substring) to be ignored by the download counter | "./histview_ignorebots" |
| rejectfile | Like the ignorefile - but UAs listed here will be completely rejected | "./histview_reject" |
| rejectheader | Header to send to rejected UAs | "HTTP/1.1 403 Forbidden" |
| rejectmsg | HMTL page to send to rejected UAs (instead of the file) | "<html><head><title>403 Forbidden</title></head><body>Bots should not download files here.</body></html>" |
| excludes | Files which are not to be served - even if contained in one of the download directories | array(".","..","files.htm","files.php","index.php","index.htm","index.html") |
| statisticsmode | Collect statistics in a database (1) or not (0)? If you only want to protect your downloads against bots, but don't want the download counters etc., you can turn it off with this setting. | 1 |
