retracker.local

поиском?
не адаптировам
PHP:
// announce urls
  $info = (@$tor['info']) ? $tor['info'] : array();

    if (!@$info['name'] || !@$info['piece length'] || !@$info['pieces'] || strlen($info['pieces']) % 20 != 0)
    {
        torrent_error_exit('Invalid torrent file');
    }

    $totallen = 0;

    if (@$info['length'])
    {
        $totallen = (float) $info['length'];
    }
    else if (@$info['files'] && is_array($info['files']))
    {
        foreach ($info['files'] as $fn => $f)
        {
            $totallen += (float) $f['length'];
        }
    }
    else
    {
        torrent_error_exit('Invalid torrent file');
    }

    $totalsize = '';
    $totalsize = sprintf('%.0f', (float) $totallen);

    $topicname = '';
    $topicname = urlencode(iconv('UTF-8', 'CP1251', $info['name']));

        $tor['announce-list'] = array(
              array(strval($ann_url . $passkey_url),),
        array('http://retracker.local/announce')
              );
 
DarkMod, был такой модик из профиля выставляет вкл/откл retracker.local мне кажется это более удобное решение
 
поиском?
не адаптировам
PHP:
// announce urls
  $info = (@$tor['info']) ? $tor['info'] : array();

    if (!@$info['name'] || !@$info['piece length'] || !@$info['pieces'] || strlen($info['pieces']) % 20 != 0)
    {
        torrent_error_exit('Invalid torrent file');
    }

    $totallen = 0;

    if (@$info['length'])
    {
        $totallen = (float) $info['length'];
    }
    else if (@$info['files'] && is_array($info['files']))
    {
        foreach ($info['files'] as $fn => $f)
        {
            $totallen += (float) $f['length'];
        }
    }
    else
    {
        torrent_error_exit('Invalid torrent file');
    }

    $totalsize = '';
    $totalsize = sprintf('%.0f', (float) $totallen);

    $topicname = '';
    $topicname = urlencode(iconv('UTF-8', 'CP1251', $info['name']));

        $tor['announce-list'] = array(
              array(strval($ann_url . $passkey_url),),
        array('http://retracker.local/announce')
              );
в какую строку это вписать?
 
functions_torrent.php
Найти:
PHP:
if ($comment = trim($comment))
  {
    $tor['comment'] = strval($comment);
    unset($tor['comment.utf-8']);
  }
После добавить:
PHP:
  // announce urls
  $info = (@$tor['info']) ? $tor['info'] : array();

    if (!@$info['name'] || !@$info['piece length'] || !@$info['pieces'] || strlen($info['pieces']) % 20 != 0)
    {
        torrent_error_exit('Invalid torrent file');
    }

    $totallen = 0;

    if (@$info['length'])
    {
        $totallen = (float) $info['length'];
    }
    else if (@$info['files'] && is_array($info['files']))
    {
        foreach ($info['files'] as $fn => $f)
        {
            $totallen += (float) $f['length'];
        }
    }
    else
    {
        torrent_error_exit('Invalid torrent file');
    }

    $totalsize = '';
    $totalsize = sprintf('%.0f', (float) $totallen);

    $topicname = '';
    $topicname = urlencode(iconv('UTF-8', 'CP1251', $info['name']));

        $tor['announce-list'] = array(
              array(strval($ann_url . $passkey_url),),
        array('http://retracker.local/announce')
              );
 
для адаптации надо в этом коде заменить
Code:
array(strval($ann_url . $passkey_url),),
на
Code:
array($announce),
 
Используя этот так называемый мод, возможно подключить локальную сеть, т.е. один и более провайдеров. Что то на подобее ретрекера.?
 
Back
Top