mod_bt - Making things better for seeders
Documentation
php_mod_bt
PHP language bindings for mod_bt
SYNOPSIS
dl("php_mod_bt.so"); # or specify in php.ini for faster access if($hashes = tracker_infohashes()) { foreach(array_keys($hashes) as $h) { print "Hash \"$h\" (" . $hashes[$h]["filename"] . ") has " . $hashes[$h]["peers"] . "peers, " . $hashes[$h]["seeds"] . " of which are seeds.
\n"; } }
DESCRIPTION
The php_mod_bt
extension provides a direct interface from the PHP language
to information about a running mod_bt
tracker on the same apache server.
FUNCTIONS
tracker_config()
Returns an associative array describing the tracker's current configuration.
tracker_stats()
Returns an associative array giving statistics on the tracker's operation.
tracker_flags()
Returns an associative array of all possible tracker configuration flags; the keys are the binary values of the flags, and the values are the flags' configuration names.
tracker_infohashes()
Returns an associative array of every torrent the tracker knows about, the keys being 40-byte hexadecimal representations of the 20-byte infohash, the values being arrays containing key/value pairs which provide details about the hash.
tracker_infohash($infohash)
Given a 40-byte hexadecimal representation of a 20-byte infohash, returns an associative array containing details about that hash.
tracker_peers($infohash)
Given a 40-byte hexadecimal representation of a 20-byte infohash, returns an associative array of all peers presently connected to that torrent. The keys are 40-byte hexadecimal represenatations of the peers' 20-byte peer id, and the values are associative arrays containing details for the peers.
tracker_peer_flags()
Returns an associative array of all possible peer information flags; the keys are the binary values of the flags, and the values are the flags' configuration names.