Configuration

In the script root folder (the folder that contains all the other folders like /docu/, /inc/, /languages/, /templates/ etc.) you can find the file index.php. That file is basically the configuration file. You can open the index.php file in a text editor.

Options in "index.php"

The file "index.php" can be viewed as the configuration file of the script. It is possible to duplicate the file and set it up in a different manner. That enables you to run several download centers with the same script core.

The following variables can be edited:

$referring_server

This variable contains all servers that are allowed to link to the script. If you enter the name of your server you can prevent all downloads that are referred by an unauthorized domain. Enter in this variable the list of domain names and IP addresses that are authorized to link to your download files. If you leave this variable empty the referring server will not be checked and everyone can link to your download files.

$allow_empty_referer

Some tools on the user's side don't pass the referrer (referring site) for privacy reasons. That can be a firewall or a web browser. You can allow the access with an empty referrer by setting this variable to "yes" or deny access by setting this variable to "no".

$ip_banlist

This variable can contain the IP addresses of users that you never want to access your script. Please be careful. Different users may use the same IP address (proxy server). If you do not want to use this feature, just leave the variable empty.

$language

You can set here the language. Enter the abbreviation that also is used in the name of the language file in the directory "languages" ("en" in languages.en.inc.php and "de" in languages.de.inc.php).

$show_error_messages

The default value of this variable is "yes" so during the configuration process you will get error messages and hints that help you installing the script. Once the script configuration have been finished you can set off these system messages because it is not necessary to give extern visitors a view in the system.

$log_downloads

As already described in the introduction you are able do log downloads. Set the variable to "yes" and make sure that the directory "log" and the file "log.txt" have write permissions (chmod 777).

$count_downloads

If you want the script to count the downloads, set this variable to "yes" and make sure that the directory "log" and the file "count.txt" have write permissions (chmod 777).

$path['downloads']

Enter in this variable the path to your download folder. When you do not change the path and leave the default "./downloads/", the script will use the folder "downloads". That folder already contains an .htaccess file that protects the folder from access by an extern visitor. A safer solution would be to place the download folder outside of the WWW root.

$path['templates']

This file contains the path to the directory where the HTML template are stored.

$path['logfiles']

This file contains the path to the directory where the log files are stored.

$file['template']

In case that an error occurs the content of that file will be displayed. You can customize the content of the template file and deliver your visitors a customized error message.

$file['log']

This variable contains the name of the log file.

$file['count']

This is the name of the file, where the downloads are counted.

$add_text

You can add further values, text, variables or other content to this variable. That content can be displayed in the HTML templates by using markers/placeholders within curly brackets { and }. If you want to add your own values to the variable $add_text please follow the pattern from the example entries.

$add_text = array(
    'txt_additional' => 'Additional',
    'txt_more' => 'More'
    );

The first part of each entry is the name of the placeholder. In case you want to use the value of txt_addition in your template enter the name of the entry with curly brackets - {txt_addition}. The name must not contain white spaces or special characters. Only allowed is the underscore ( _ ) .