【问题标题】:Scrape multitracker torrent php刮多轨器torrent php
【发布时间】:2016-06-13 13:34:04
【问题描述】:

我需要获取给定 .torrent 的播种机和 leechers 的数量。 比方说this one(目前它是一个非常受欢迎的种子,它肯定有大量的播种者和水蛭)

我解码了种子文件并得到了公告:

$announces = array("udp://tracker.opentrackr.org:1337/announce",
"udp://tracker.coppersurfer.tk:6969/announce",
"udp://tracker.openbittorrent.com:80/announce",
"udp://glotorrents.pw:6969/announce",
"udp://tracker.leechers-paradise.org:6969/announce",
"udp://zer0day.ch:1337/announce",
"udp://9.rarbg.me:2710/announce",
"udp://tracker.trackerfix.com:80/announce",
"udp://eddie4.nl:6969/announce",
"udp://9.rarbg.to:2710/announce");

还有 hash_info = "0ddf5052c1c580a129598186e05c494f45727881";

然后,我将“udp”替换为“http”,将“announce”替换为“scrape”,并使用 Torrent 哈希发送 curl 获取请求,如下所示:

foreach($announces as $announce){
$scrape_url = str_ireplace( array( 'udp://', '/announce' ), array( 'http://', '/scrape' ), $announce).pack('H*',"0ddf5052c1c580a129598186e05c494f45727881");
echo file_get_contents($scrape_url)."<hr>";
}

但我得到的唯一结果是“连接被拒绝”、“操作超时”和“HTTP 请求失败!HTTP/1.1 404 Not Found”。我究竟做错了什么?顺便说一句,Curl 给出了相同的结果。

【问题讨论】:

  • 可能是因为 udp !== http?
  • 谢谢,这确实有帮助!

标签: php torrent


【解决方案1】:

问题是您尝试在 UDP 跟踪器上执行 http-scrapes。
要抓取 UDP 跟踪器,您需要遵循以下协议:
BEP15 -UDP Tracker Protocol for BitTorrent

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-18
    • 1970-01-01
    • 2014-02-13
    相关资源
    最近更新 更多