(int) 1800, 'failure reason' => (string) $msg, 'warning message' => (string) $msg, )); die($output); } define('TR_ROOT', './'); require(TR_ROOT . 'includes/init_tr.php'); $info_hash_sql = rtrim(DB()->escape($info_hash), ' '); $info_hash_where = $is_bt_v2 ? "WHERE tor.info_hash_v2 = '$info_hash_sql'" : "WHERE tor.info_hash = '$info_hash_sql'"; $row = DB()->fetch_row(" SELECT tor.complete_count, snap.seeders, snap.leechers FROM ". BB_BT_TORRENTS ." tor LEFT JOIN ". BB_BT_TRACKER_SNAP ." snap ON (snap.topic_id = tor.topic_id) $info_hash_where LIMIT 1 "); if (!$row) { msg_die('Torrent not registered, info_hash = ' . bin2hex($info_hash_sql)); } $output['files'][$info_hash] = array( 'complete' => (int) $row['seeders'], 'downloaded' => (int) $row['complete_count'], 'incomplete' => (int) $row['leechers'], ); echo bencode($output); tracker_exit(); exit;