0 Schlabo's Scripts

Schlabo's
Scripts
- home -


Scripts
 Information
 Admin
 POTD
 DL
 SP
 COW

Download
 Download

Installation & Usage
 Overview
 Installation
 Q&A: Admin
 Q&A: POTD
 Q&A: DL
 Q&A: SP
 Q&A: COW

Support
 Troubleshooting

General
 Startpage
 What's New?
 Quotes
 Future
 Contact
 Privacy
 Terms of Use
 Copyright

 


DL-Q&A

< Back to the Overview...

 

 How can I display how often a file has already been downloaded?

This only works if your server supports SSI, if it doesn't ask you server-admins to activate it. You just have to add the following HTML-Code where you want the DownloadCount to be displayed:

<!--#include virtual="/cgi-bin/schlabo/dl_showdc.pl?Testfile"-->

The script will then display the HTML-Code specified using the General-Admin-Script (Introduction, like "this file has already been downloaded ", then the DC for this File/Alias (counts all mirrors), then the 2nd part of the HTML-Code (like " times.").

On some servers (especially on NT-Servers) you have to use a different SSI-call to include a script. Try it if include virtual doesn't work:

<!--#exec cgi="/cgi-bin/schlabo/dl_showdc.pl?Testfile"-->

Please note that most servers only parse files with the extension ".php" for SSI-calls. If your server does not parse the SSI-calls, try renaming the file where you want to include the scripts to ".php" or contact your administrator to change the configuration of the server.

If your site is quite large and you use this method very often, the work-load for your server can get quite much. Especially then it's recommended to use the Count Alias-Files.