Edit Config File

This page allows you to configure the "config.php" settings. This file stores all the necessary settings for your tracker. Please do NOT edit the "config.php" file directly, use this admin page for any changes.

* - required value

"); $temp = fgets($fr); $temp = fgets($fr); $temp = substr($temp, strpos($temp, "=")+2, -2); ?>
Make tracker hidden: This will require a login by either the admin or upload user in order to see the torrents available on the main statistics page. This does not mean it's a private tracker. If you need a private tracker, there are many other trackers out there. Also, you will need to secure the "torrents" folder with an .htaccess file for Apache or some other method. The tracker will still accept all valid connections by clients. There is no user checking in that regard. " name="hiddentracker">
Enable or disable scraping by clients. Generally it is safe to leave this on unless you have a large number of torrents or users which can lead to increased bandwidth usage. Also, scraping can possibily be used maliciously by abusive clients. " name="scrape">
Displays custom titles on the main torrent statistics page instead of the filename. This is because the uploader script will auto-rename your uploaded filename to exactly what you specified initally or by automatically using the data from the uploaded torrent. Check this if you want the titles to be different from the filename. " name="customtitle">
Short Announce URL: You can turn on the short announce feature, making the URL end in /announce for your tracker. You should not utilize both tracker URL forms in one torrent at the same time, or you will get inconsistent results. Note: You will need the provided htaccess file, have URL rewrite capabilities, and have it properly set up to use this feature. Otherwise, leave it disabled.
* Lists the number of torrents on each page on your torrent tracker list. Default is 10.
* Lists the number of torrents on each page on the detailed statistics page. Default is 5.
* Maximum reannounce interval (in seconds) 1800 == 30 minutes
* Minimum reannounce interval (also in seconds) 300 == 5 minutes
* Number of peers to send in one request. Some logic will break if you set this to more than 300, so please don't do that. 100 is the most you should set anyway.
If set, NAT checking will be performed. This may cause trouble with some providers, so it's off by default. " name="NAT">
Persistent MySQL connections: Check with your webmaster to see if you're allowed to use these. Highly recommended, especially for higher loads, but generally not allowed unless it's a dedicated machine. " name="persist">
Allow users to override ip address. Enable this if you know people have a legit reason to use this function. Leave disabled otherwise. " name="ip_override">
For heavily loaded trackers, uncheck this. It will stop count the number of downloaded bytes and the speed of the torrent, but will significantly reduce the load. " name="countbytes">
* Username for individual who can add torrents to tracker database. This user is only able to create, and not delete torrents to the tracker. For full privileges, see the admin user.
* Password for individual who can add torrents to tracker database. Again, this user is only able to create, and not delete torrents to the tracker. For full privileges, see the admin user.

Current MD5 hashed username+password:
* Admin username. The admin is able to go to the admin page and show detailed information about the tracker as well as access a few other important tools. The admin is also able to upload torrents to the database just like the previous account.
* Password for admin. Again, The admin is able to go to the admin page and show detailed information about the tracker as well as access a few other important tools. The admin is also able to upload torrents to the database.

Current MD5 hashed username+password:
Title on index.php statistics page, if not set, defaults to "Tracker Statistics"
* Database Hostname: This is the MySQL database hostname, if it is the local machine, it should be set to localhost.
* Database Username: This is the user who has access to the database table. If you are unsure, check with your system administrator.
* Database Password: This is the password for the user who has access to the database table. If you are unsure, check with your system administrator.
* Database name: This is the name of the database. If you are unsure, check with your system administrator.
Enable RSS feed: If you do not want the RSS feed to be created for privacy reasons or do not need it disable this checkbox. " name="enablerss">
RSS Title: In the rss.xml file, this is the main
<title>
tag.
RSS link to main website: In the rss.xml file, this is the main
<link>
tag.
RSS description: In the rss.xml file, this is the main
<description>
tag.
* Main website url that the tracker runs on, example: http://www.mywebsite.com
* For HTTP seeding, this is the maximum total upload rate per second in kilobytes, for example 100 would be 100 KB/s
* For HTTP seeding, this is the maximum number of uploads to run at a time
* Date format of the torrent publication date. It shows on statistics.php. If you change this setting, you will have to change it for every other existing torrent!
* Timezone that the server runs on
"; exit(); } if (!is_numeric($_POST["indexpagelimitspecify"]) || $_POST["indexpagelimitspecify"] == "" || $_POST["indexpagelimitspecify"] <= 0) { echo errorMessage() . "Error: The index page limit is not an integer, a negative number, or is blank.

"; exit(); } if (!is_numeric($_POST["statspagelimitspecify"]) || $_POST["statspagelimitspecify"] == "" || $_POST["statspagelimitspecify"] <= 0) { echo errorMessage() . "Error: The statistics page limit is not an integer, a negative number, or is blank.

"; exit(); } if (!is_numeric($_POST["report_interval"]) || $_POST["report_interval"] == "" || $_POST["report_interval"] <= 0) { echo errorMessage() . "Error: The maximum reannounce interval is not an integer, a negative number, or is blank.

"; exit(); } if (!is_numeric($_POST["min_interval"]) || $_POST["min_interval"] == "" || $_POST["min_interval"] <= 0) { echo errorMessage() . "Error: The minimum reannounce interval is not an integer, a negative number, or is blank.

"; exit(); } if (!is_numeric($_POST["maxpeers"]) || $_POST["maxpeers"] == "" || $_POST["maxpeers"] > 300 || $_POST["maxpeers"] <= 0) { echo errorMessage() . "Error: The number of peers to send in one request is not an integer, over 300, a negative number, zero, or blank.

"; exit(); } if ($_POST["upload_username"] == "") { echo errorMessage() . "Error: The upload username is blank.

"; exit(); } if ($_POST["admin_username"] == "") { echo errorMessage() . "Error: The admin username is blank.

"; exit(); } if ($_POST["dbhost"] == "") { echo errorMessage() . "Error: The database hostname is blank.

"; exit(); } if ($_POST["dbuser"] == "") { echo errorMessage() . "Error: The database username is blank.

"; exit(); } if ($_POST["dbpass"] == "") { echo errorMessage() . "Error: The database password is blank.

"; exit(); } if ($_POST["database"] == "") { echo errorMessage() . "Error: The database name is blank.

"; exit(); } if ($_POST["rss_link"] != "" && Substr($_POST["rss_link"], 0, 7) != "http://") { echo errorMessage() . "Error: The RSS website URL does not start with http://

"; exit(); } if ($_POST["website_url"] == "" || Substr($_POST["website_url"], 0, 7) != "http://") { echo errorMessage() . "Error: The website URL does not start with http:// or is blank.

"; exit(); } if (!is_numeric($_POST["max_upload_rate"]) || $_POST["max_upload_rate"] == "" || $_POST["max_upload_rate"] <= 0) { echo errorMessage() . "Error: The maximum upload rate is not an integer, a negative number, or is blank.

"; exit(); } if (!is_numeric($_POST["max_uploads"]) || $_POST["max_uploads"] == "" || $_POST["max_uploads"] <= 0) { echo errorMessage() . "Error: The maximum uploads is not an integer, a negative number, or is blank.

"; exit(); } if ($_POST["dateformat"] == "") { echo errorMessage() . "Error: The date format is blank.

"; exit(); } if ($_POST["timezone"] == "") { echo errorMessage() . "Error: The timezone is blank.

"; exit(); } if ($_POST["upload_username"] == $_POST["admin_username"]) { echo errorMessage() . "Error: The admin username cannot be the same as the upload username.

"; exit(); } //calculate new MD5 password if needed if ($_POST["upload_password"] != "") { $_POST["upload_password"] = md5($_POST["upload_username"].$_POST["upload_password"]); } else $_POST["upload_password"] = $_POST["old_upload_password"]; if ($_POST["admin_password"] != "") { $_POST["admin_password"] = md5($_POST["admin_username"].$_POST["admin_password"]); } else $_POST["admin_password"] = $_POST["old_admin_password"]; //check if config.php has write access if (is_writable("config.php")) { //go through checkboxes and change "on" to "true" if (isset($_POST["hiddentracker"])) $hiddentracker = "true"; else $hiddentracker = "false"; if (isset($_POST["enablerss"])) $enablerss = "true"; else $enablerss = "false"; if (isset($_POST["scrape"])) $scrape = "true"; else $scrape = "false"; if (isset($_POST["customtitle"])) $customtitle = "true"; else $customtitle = "false"; if (isset($_POST["NAT"])) $NAT = "true"; else $NAT = "false"; if (isset($_POST["persist"])) $persist = "true"; else $persist = "false"; if (isset($_POST["ip_override"])) $ip_override = "true"; else $ip_override = "false"; if (isset($_POST["countbytes"])) $countbytes = "true"; else $countbytes = "false"; //write config.php file $fd = fopen("config.php", "w") or die(errorMessage() . "Warning: write to config.php!

"); fwrite($fd, "" ); fclose($fd); echo "

config.php file was edited successfully!

\n"; //run RSS generator require_once("rss_generator.php"); } else { echo errorMessage() . "config.php was not able to be written. Please check the permissions and try again.

\n"; } } ?>

Admin PageReturn to Admin Page