SourceForge home | Downloads | Forums
  Support This Project
Table of contents

  1. What is BitTorrent?
  2. What is PHPBTTracker+?
  3. PHPBTTracker+ Capabilities
  4. Approximate bandwidth usage
  5. PHPBTTracker+ History
  6. Requirements
  7. Warnings
  8. Features
  9. Manual
  10. Download
  11. Online demonstration

What is BitTorrent?

BitTorrent is file sharing software. You need four things to have BitTorrent work: a BitTorrent client, a BitTorrent tracker, a file to share, and a torrent file (made from the file to share.) The torrent file is placed where others can have access to it (i.e. a website.)

The clients use the torrent file to connect to the tracker; this allows the client to find other peers to get the file from. This is the simplest explanation.
What is PHPBTTracker+?

PHPBTTracker+ is a bittorrent tracker; it is an extension of the original PHPBTTracker authored by DeHackEd.

Version 2.x of PHPBTTracker+ is based off of the core of PHPBTTracker 1.5e, and supports peer caching and the compact protocol.

Version 1.x of PHPBTTracker+ is based off of the core of PHPBTTracker 1.4 (an older release of the original phpbttracker.)
PHPBTTracker+ Capabilities

Version 2.x has been tested to handle approximately 10,000 peers on a 1mbit upload connection and a Pentium 4 1.6GHz PC with 1GB of RAM.

Version 1.x has been tested to handle approximately 4500 clients on a 640kbit upload connection and a Pentium 3 - 500MHz computer with 512MB of RAM. It has not been tested or recommend using with a higher number of peers.
Approximate bandwidth usage

The bandwidth usage will vary depending on two factors: how many torrents are on the server and how many clients are connected at any time.

PHPBTTracker+ 2.x with 5500 peers connected will use approximately 15-20KB/sec continuously (this includes serving the torrent statistics as well as the torrents themselves.) This is a combined up/down figure. Approximate CPU usage with the P4 1.6GHz is 20% (the mysql database runs on the same processor.)

PHPBTTracker+ 1.x with 2000 peers connected will use approximately 10-15KB/sec continuously (this includes serving the torrent statistic page and the torrents themselves.) This is a combined up/down figure. Again, this can change depending on the load on the tracker.
PHPBTTracker+ History

PHPBTTracker+ was "founded" in October 2003, after trying several different trackers. The original python tracker was really basic, and the others that were found were either very difficult to customize or had security issues. This is when PHPBTTracker (the original version) was found. Requiring a webserver with a database, it seemed like the one to try. It was perfect for a small tracker with a small number of peers. After using the original version for 2 months (this was October '03) I realized that it was a pain to be around all of the time when people wanted to use my tracker. So, research on PHP started.

It was at this point that a lot of little "fixes" made it's way into the tracker core, along with some other things, such as tracking peer uploads and client versions. In February/March '04 the administration was deployed and made available to people using my tracker. Receiving good feedback, I continued writing other modules, like client filtering. Apparently this tracker version was getting attention, I started getting PMs on IRC, posts on forums, and emails regarding my version of the tracker.

After talking to someone interested in my tracker, he agreed to be a beta-tester and had a slightly different configuration than mine. So, all of the modifications were able to be tested on two servers. After some thought, I decided to request space on And now, this tracker version can be downloaded by anyone running *nix machines to try.


This tracker requires a linux distribution installed with apache, php, and mysql. This version is untested and unsupported on any version of Windows. If you feel lucky, you can try it; keep in mind some of the scripts may be using procedure calls that are not supported on the Windows OS.
  • Apache: Version 1.x/2.x (tested on both)
  • PHP: 4.3.0 or greater
  • Mysql: 4.0.x or greater


There are three warnings that tracker owners need to be aware of.

PHP Upload Bug! In PHP version 4.3.10 (possibly earlier versions) there is a file upload bug. This bug appears when magic_quotes_gpc is enabled on the server (most are set on by default.) When on, any filenames uploaded with an apostrophe (') will get mangled (anything to the left of the apostrophe, including the apostrophe itself is truncated.) It is recommended to upgrade to PHP 4.3.11 or newer. This isn't a PHPBTTracker+ bug!

Using trackers on shared webhosts: There have been many occurences of hosting accounts being shut down when trackers are run on a shared hosting setup. Do not run a PHP/mysql tracker on a shared webserver. The CPU cycles it eats up (by the script itself or the database) usually causes the network owners to notice and suspend your accounts. PHP trackers should optimally be run on their own servers. This also applies to shared database hosts.

Using trackers in a webserver farm: While the tracker will work fine, the administration interface won't. This has to do with PHP sessions storing the session data in a temporary folder on the webserver. When you load another page, you aren't guaranteed to get the same webserver with your session data. You will need to set a special configuration variable in the configuration script (PHPBTTracker+ 1.7 and newer) for the administration interface to work properly.


Some of the highlights of this particular version are listed below. Note: most of this functionality is disabled by default.

Tracker features
  • Full administration interface - see below
  • Client version filtering - disallow certain clients from connecting
  • Semi-automatic consistency checks - through /scrape - if stats incorrect, will repair automatically
  • IP Banning - Disallow selective IP addresses from connecting to the tracker
  • Auto Banning - can automatically ban clients that do not identify themselves
  • Average progress - shows average progress on the torrent
  • Torrent uploads - allows uploading of torrents to a directory OR the database (>= v1.7) on the webserver
  • Disable scrape - enable/disable scrape in configuration file (as opposed to recreating torrents - useful if you expect a large number of peers for a release, and need to disable all scrape output temporarily)
  • Extra scrape output - report speed, average progress and amount downloaded in the /scrape output
  • External torrent support - allows adding of external torrents, and includes a script to update statistics
  • Sample scripts - includes the following sample scripts: a sample script that parses /scrape output from an external tracker, and 3 different types of statistics scripts (function-callable, a basic script with no css, and a script with css)
  • 'Hide' torrents - allows "hiding" of active torrents (the torrent remains active but not displayed on stats pages or in /scrape output)
  • Torrent mirror - allows definition of a url to a torrent mirrored on another site
  • Remote information links - allows definition of a url to a site with general information about the torrent
  • Checksum information - CRC32 information can be displayed on the index page, with URLs to SFV and MD5 files
  • Expiry dates - a date can be specified to remove the main link to the URL, and to hide the torrent from that statistics page altogether (note: the torrent still remains active on the tracker)
  • Multi-user - Multiple users can be created and permission defined to restrict users to certain operations. There is also a "group mode" meaning that each user can be assigned to a group, and the sample statistic scripts that are included can be set to show only a certain group.
  • Helper scripts - Has a script to analyze a tracker's /scrape response
  • Peer caching - Saves resource usage by doing calculations for peers when they initially connect and stores the calculations in the database. This allows the scripts to simply read the database and output to peers with little processing involved.
  • Compact protocol - A more bandwidth-efficient bittorrent protocol. An option is available to allow only clients that support this protocol to connect, although this usually is not needed.
  • High load optimization - A flag that will disable some functionality and optimize scripts for extreme loads. This also will hide the associated columns on the provided sample statistic pages.

Administration interface
  • Requires Javascript
  • MD5 encryption of username and password (this is still sent over cleartext)
  • can be set to use a different session path for webserver farms
  • written using PHP sessions
  • multi-user if needed
  • Interface allows:
    1. addition of torrents
    2. removal of torrents
    3. "retiring" of torrents
    4. manage retired torrents
    5. editing of an existing torrent
    6. viewing a list of peers and seeders, with information such as client version reported and how much peer has uploaded to the torrent
    7. banning by IP address
    8. user management
    9. view current tracker configuration
    10. online help


There is no online manual. In the tarball, check the files README, INSTALL, and ISSUES for information on setting up the tracker. There is also a sample configuration file named config_sample.php that you can load in a text editor to read the comments inside.


PHPBTTracker+ can be downloaded here.

Online demonstration

There is an online demonstration available.

Hosted by Logo
  Support This Project