最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

bittorrent - PHP - Download the list of files (or metadata?) of a torrent from a magnet URIURLLink? - Stack Overflow

programmeradmin3浏览0评论

To be clear, I am not trying to actually download the contents of the torrent. I just want to find out what files are IN the torrent (from its magnet link) so I can make sure it doesn't contain bogus spyware or such.

I need a bit of PHP code that takes in a magnet link (ie, "magnet:?xt=urn:btih:12cb31ae6fd4624fe6be48.....")

And what I'm looking to do is get back the list of files (or all the metadata) that are in that torrent. But I can't even get as far as downloading the contents of the torrent file from the magnet link.

I have code that converts a full magnet URI into something like this:

Array
(
    [xt] => urn:btih:12cb31ae6fd4624fe6be485c...
    [dn] => Son.of.a.Critch.S0...
    [tr] => Array
        (
            [0] => udp://example:80/announce
            [1] => udp://example2:6969/announce
            [2] => udp://example3.is:6969/announce                
        )

)

But from here, how do I actually retrieve the torrent's file list and/or metadata?


EDIT: It was suggested this q/a might help: How to pull the torrent file from DHT? but that does not address what I am asking in this question, nor does it take into account PHP in any way. The accepted answer is just "you'll need to implement all the technical details." I am hoping to find out exactly HOW to do that, preferably in PHP, and preferably with something which has already been written.

发布评论

评论列表(0)

  1. 暂无评论