у нас так, всевремя растёт
Код
// Retrackers begin
$retracker = false;
if (strlen($user_ip) == 8) {
$ip = hexdec2($user_ip);
// Totoro_NET и OptiNET, Украина, г. Полтава
if (($ip & (-1 << (32-23))) == hexdec2(encode_ip('194.44.38.0')) ||
($ip & (-1 << (32-22))) == hexdec2(encode_ip('193.93.12.0')))
$retracker = 'http://retracker.totoronet/announce.php';
// ОАО "БашИнформСвязь"
if (($ip & (-1 << (32-19))) == hexdec2(encode_ip('62.133.160.0')) ||
($ip & (-1 << (32-19))) == hexdec2(encode_ip('77.94.96.0')) ||
($ip & (-1 << (32-18))) == hexdec2(encode_ip('83.174.192.0')) ||
($ip & (-1 << (32-19))) == hexdec2(encode_ip('92.245.32.0')) ||
($ip & (-1 << (32-18))) == hexdec2(encode_ip('94.75.0.0')) ||
($ip & (-1 << (32-17))) == hexdec2(encode_ip('95.110.0.0')))
$retracker = 'http://retracker.bashtel.ru/announce.php';
// InterZet, Питер
if (($ip & (-1 << (32-20))) == hexdec2(encode_ip('89.113.208.0')) ||
($ip & (-1 << (32-22))) == hexdec2(encode_ip('89.113.72.0')) ||
($ip & (-1 << (32-22))) == hexdec2(encode_ip('89.113.76.0')))
$retracker = 'http://entretracker.zet/announce.php';
// Corbina Telecom по данным RoadTrain (спасибо!)
// хотя он редиректит на http://p2p.corbina.net:2710/announce может лучше его напрямую вписать?
if (($ip & (-1 << (32-16))) == hexdec2(encode_ip('93.81.0.0')) ||
($ip & (-1 << (32-16))) == hexdec2(encode_ip('89.179.0.0')) ||
($ip & (-1 << (32-16))) == hexdec2(encode_ip('95.28.0.0')) ||
($ip & (-1 << (32-19))) == hexdec2(encode_ip('195.14.32.0')) ||
($ip & (-1 << (32-19))) == hexdec2(encode_ip('62.205.160.0')) ||
($ip & (-1 << (32-18))) == hexdec2(encode_ip('213.234.192.0')) ||
($ip & (-1 << (32-17))) == hexdec2(encode_ip('83.102.128.0')) ||
($ip & (-1 << (32-16))) == hexdec2(encode_ip('85.21.0.0')) ||
($ip & (-1 << (32-15))) == hexdec2(encode_ip('89.178.0.0')) ||
($ip & (-1 << (32-15))) == hexdec2(encode_ip('78.106.0.0')) ||
($ip & (-1 << (32-15))) == hexdec2(encode_ip('93.80.0.0')) ||
($ip & (-1 << (32-13))) == hexdec2(encode_ip('95.24.0.0')))
$retracker = 'http://beeretracker.ru/announce.php';
// Казахтелеком
if (($ip & (-1 << (32-17))) == hexdec2(encode_ip('82.200.128.0')) ||
($ip & (-1 << (32-17))) == hexdec2(encode_ip('212.154.128.0')) ||
($ip & (-1 << (32-19))) == hexdec2(encode_ip('212.19.128.0')) ||
($ip & (-1 << (32-17))) == hexdec2(encode_ip('88.204.128.0')) ||
($ip & (-1 << (32-16))) == hexdec2(encode_ip('89.218.0.0')) ||
($ip & (-1 << (32-15))) == hexdec2(encode_ip('92.46.0.0')) ||
($ip & (-1 << (32-14))) == hexdec2(encode_ip('95.56.0.0')))
$retracker = 'http://xbtt.hdfilm.kz/announce';
// Локалка BdfY - UCA Networks
if (($ip & (-1 << (32-21))) == hexdec2(encode_ip('77.87.200.0')))
$retracker = 'http://retracker.ucanet.ru/announce.php';
/*
// Qwerty
if ($ip >= hexdec2(encode_ip('77.41.0.0')) && $ip <= hexdec2(encode_ip('77.41.127.255')) ||
$ip >= hexdec2(encode_ip('79.164.0.0')) && $ip <= hexdec2(encode_ip('79.165.255.255')))
$retracker = 'http://qtorrent.ru/announce.php';
*/
// NETBYNET
if (($ip & (-1 << (32-19))) == hexdec2(encode_ip('212.1.224.0')) ||
($ip & (-1 << (32-19))) == hexdec2(encode_ip('213.141.128.0')) ||
($ip & (-1 << (32-19))) == hexdec2(encode_ip('89.20.128.0')) ||
($ip & (-1 << (32-17))) == hexdec2(encode_ip('79.120.0.0')) ||
($ip & (-1 << (32-16))) == hexdec2(encode_ip('79.111.0.0')) ||
($ip & (-1 << (32-20))) == hexdec2(encode_ip('80.92.240.0')) ||
($ip & (-1 << (32-19))) == hexdec2(encode_ip('77.233.192.0')) ||
($ip & (-1 << (32-20))) == hexdec2(encode_ip('81.17.144.0')) ||
($ip & (-1 << (32-19))) == hexdec2(encode_ip('82.148.0.0')) ||
($ip & (-1 << (32-20))) == hexdec2(encode_ip('92.39.160.0')) ||
($ip & (-1 << (32-15))) == hexdec2(encode_ip('95.220.0.0')) ||
($ip & (-1 << (32-20))) == hexdec2(encode_ip('80.86.240.0')) ||
($ip & (-1 << (32-22))) == hexdec2(encode_ip('79.120.84.0')))
$retracker = 'http://retracker3.netbynet.ru/announce.php';
// SPB-IX
if (($ip & (-1 << (32-22))) == hexdec2(encode_ip('77.221.144.0')) ||
($ip & (-1 << (32-24))) == hexdec2(encode_ip('79.173.83.0')) ||
($ip & (-1 << (32-23))) == hexdec2(encode_ip('79.173.102.0')) ||
($ip & (-1 << (32-22))) == hexdec2(encode_ip('87.249.56.0')) ||
($ip & (-1 << (32-22))) == hexdec2(encode_ip('89.104.112.0')) ||
($ip & (-1 << (32-22))) == hexdec2(encode_ip('89.223.24.0')) ||
($ip & (-1 << (32-19))) == hexdec2(encode_ip('89.223.32.0')) ||
($ip & (-1 << (32-20))) == hexdec2(encode_ip('89.223.64.0')) ||
($ip & (-1 << (32-21))) == hexdec2(encode_ip('91.103.152.0')) ||
($ip & (-1 << (32-24))) == hexdec2(encode_ip('91.151.197.0')) ||
($ip & (-1 << (32-22))) == hexdec2(encode_ip('91.202.44.0')) ||
($ip & (-1 << (32-22))) == hexdec2(encode_ip('91.204.148.0')) ||
($ip & (-1 << (32-20))) == hexdec2(encode_ip('92.62.48.0')) ||
($ip & (-1 << (32-22))) == hexdec2(encode_ip('92.243.68.0')) ||
($ip & (-1 << (32-22))) == hexdec2(encode_ip('92.255.64.0')) ||
($ip & (-1 << (32-21))) == hexdec2(encode_ip('93.157.120.0')) ||
($ip & (-1 << (32-17))) == hexdec2(encode_ip('94.26.128.0')) ||
($ip & (-1 << (32-19))) == hexdec2(encode_ip('94.242.0.0')) ||
($ip & (-1 << (32-20))) == hexdec2(encode_ip('94.242.32.0')) ||
($ip & (-1 << (32-20))) == hexdec2(encode_ip('94.243.224.0')) ||
($ip & (-1 << (32-17))) == hexdec2(encode_ip('95.161.0.0')) ||
($ip & (-1 << (32-21))) == hexdec2(encode_ip('95.161.248.0')) ||
($ip & (-1 << (32-23))) == hexdec2(encode_ip('193.33.170.0')) ||
($ip & (-1 << (32-24))) == hexdec2(encode_ip('193.125.208.0')) ||
($ip & (-1 << (32-26))) == hexdec2(encode_ip('194.11.16.0')) ||
($ip & (-1 << (32-26))) == hexdec2(encode_ip('194.11.16.64')) ||
($ip & (-1 << (32-26))) == hexdec2(encode_ip('194.11.16.128')) ||
($ip & (-1 << (32-26))) == hexdec2(encode_ip('194.11.20.0')) ||
($ip & (-1 << (32-26))) == hexdec2(encode_ip('194.11.20.64')) ||
($ip & (-1 << (32-26))) == hexdec2(encode_ip('194.11.20.128')) ||
($ip & (-1 << (32-26))) == hexdec2(encode_ip('194.11.21.0')) ||
($ip & (-1 << (32-26))) == hexdec2(encode_ip('194.11.21.64')) ||
($ip & (-1 << (32-26))) == hexdec2(encode_ip('194.11.21.128')) ||
($ip & (-1 << (32-24))) == hexdec2(encode_ip('212.113.107.0')) ||
($ip & (-1 << (32-22))) == hexdec2(encode_ip('212.113.120.0')) ||
($ip & (-1 << (32-22))) == hexdec2(encode_ip('212.116.96.0')) ||
($ip & (-1 << (32-23))) == hexdec2(encode_ip('217.79.4.0')))
$retracker = 'http://retracker.spb.ru/announce.php';
// Красноярск
if (($ip & (-1 << (32-24))) == hexdec2(encode_ip('80.240.39.0')) ||
($ip & (-1 << (32-21))) == hexdec2(encode_ip('84.22.128.0')) ||
($ip & (-1 << (32-21))) == hexdec2(encode_ip('93.92.112.0')) ||
($ip & (-1 << (32-21))) == hexdec2(encode_ip('84.22.136.0')) ||
($ip & (-1 << (32-24))) == hexdec2(encode_ip('84.22.157.0')) ||
($ip & (-1 << (32-24))) == hexdec2(encode_ip('84.22.158.0')) ||
($ip & (-1 << (32-24))) == hexdec2(encode_ip('84.22.159.0')) ||
($ip & (-1 << (32-21))) == hexdec2(encode_ip('84.22.144.0')) ||
($ip & (-1 << (32-19))) == hexdec2(encode_ip('212.55.64.0')) ||
($ip & (-1 << (32-24))) == hexdec2(encode_ip('84.22.153.0')) ||
($ip & (-1 << (32-18))) == hexdec2(encode_ip('94.78.192.0')) ||
($ip & (-1 << (32-20))) == hexdec2(encode_ip('93.90.240.0')) ||
($ip & (-1 << (32-22))) == hexdec2(encode_ip('87.236.44.0')) ||
($ip & (-1 << (32-22))) == hexdec2(encode_ip('87.236.40.0')) ||
($ip & (-1 << (32-18))) == hexdec2(encode_ip('95.156.64.0')))
$retracker = 'http://kras-rt.ru/announce.php';
}
if (strlen($user_ip) == 32) {
$retracker = preg_replace('#http://(bt\.)?#', 'http://ipv6.', $announce);
}
if ($retracker) {
if (!$tor['announce-list']) $tor['announce-list'] = array(array($announce));
$tor['announce-list'][] = array($retracker);
}
// Retrackers end
Код
// on numbers more than 0x7FFFFFFF hexdec returns positive float, and we need negative integer...
function hexdec2 ($str) {
$result = 0;
for ($i=0; $i < strlen($str); $i++)
$result = ($result << 4) | hexdec(substr($str, $i, 1));
return $result;
}