mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 18:48:21 -07:00
Updated
This commit is contained in:
parent
ed8fe6fbf1
commit
3c503c981f
3 changed files with 27 additions and 41 deletions
|
@ -10,6 +10,7 @@
|
|||
define('IN_TRACKER', true);
|
||||
define('BB_ROOT', './../');
|
||||
require dirname(__DIR__) . '/common.php';
|
||||
require __DIR__ . '/includes/init_tr.php';
|
||||
|
||||
global $bb_cfg;
|
||||
|
||||
|
@ -39,19 +40,6 @@ if (strlen($info_hash) == 32) {
|
|||
msg_die('Invalid info_hash');
|
||||
}
|
||||
|
||||
function msg_die($msg)
|
||||
{
|
||||
$output = \SandFox\Bencode\Bencode::encode([
|
||||
'min interval' => (int)1800,
|
||||
'failure reason' => (string)$msg,
|
||||
'warning message' => (string)$msg,
|
||||
]);
|
||||
|
||||
die($output);
|
||||
}
|
||||
|
||||
require __DIR__ . '/includes/init_tr.php';
|
||||
|
||||
$info_hash_sql = rtrim(DB()->escape($info_hash), ' ');
|
||||
/**
|
||||
* Поскольку торрент-клиенты в настоящее время обрезают инфо-хэш до 20 символов (независимо от его типа, как известно v1 = 20 символов, а v2 = 32 символа),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue