UDP Tracker Scraping 1 脚本工作其他不 [英] UDP Tracker Scraping 1 script working other Not

查看:66
本文介绍了UDP Tracker Scraping 1 脚本工作其他不的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用此脚本时,我的跟踪器仅更新种子和来自 http 跟踪器的 leechers 仅 1st Tracker 我的 torrent.

While using this script my tracker only update seeds & leechers from http tracker only 1st Tracker of my torrent.

print("<tr><td class='desc'><b>" .T_("Torrent Stats"). ": </b></td><td valign='top' class='lista'>");
        $seeders1 = $leechers1 = $downloaded1 = null;

        $tres = SQL_Query_exec("SELECT url FROM announce WHERE torrent=$id");
        while ($trow = mysql_fetch_assoc($tres)) {
            $ann = $trow["url"];
            $tracker = explode("/", $ann);
            $path = array_pop($tracker);
            $oldpath = $path;
            $path = preg_replace("/^announce/", "scrape", $path);
            $tracker = implode("/", $tracker)."/".$path;

            if ($oldpath == $path) {
                continue; // Scrape not supported, ignored
            }

            // TPB's tracker is dead. Use openbittorrent instead
            if (preg_match("/thepiratebay.org/i", $tracker) || preg_match("/prq.to/", $tracker)) {
                $tracker = "http://tracker.openbittorrent.com/scrape";
            }

            $stats = torrent_scrape_url($tracker, $row["info_hash"]);
            if ($stats['seeds'] != -1) {
                $seeders1 += $stats['seeds'];
                $leechers1 += $stats['peers'];
                $downloaded1 += $stats['downloaded'];
                SQL_Query_exec("UPDATE `announce` SET `online` = 'yes', `seeders` = $stats[seeds], `leechers` = $stats[peers], `times_completed` = $stats[downloaded] WHERE `url` = ".sqlesc($ann)." AND `torrent` = $id");
            } else {
                SQL_Query_exec("UPDATE `announce` SET `online` = 'no' WHERE `url` = ".sqlesc($ann)." AND `torrent` = $id");

            }
        }

请更正我一直没能解决这个问题.在第一个代码中,我认为麻烦就在这里

Please correct It I haven't been able to solve this trouble. In first code I think trouble is here

$tres = SQL_Query_exec("SELECT url FROM announce WHERE torrent=$id");

推荐答案

问题是您正在向 UDP 跟踪器发送 http-scrape.
UDP-tracker 使用完全不同的协议:http://www.bittorrent.org/beps/bep_0015.html

The problem is that you are sending a http-scrape to an UDP-tracker.
UDP-tracker uses an entirely diffrent protocol: http://www.bittorrent.org/beps/bep_0015.html

这篇关于UDP Tracker Scraping 1 脚本工作其他不的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆