torrent file
5.3.1
一個處理torrent file PHP 類
composer require arokettu/torrent-file
<?php
use Arokettu Torrent TorrentFile ;
// open file
$ torrent = TorrentFile:: load ( ' debian.torrent ' );
// create for path (file or directory)
$ torrent = TorrentFile:: fromPath ( ' /home/user/dists/debian ' );
// manipulate fields
$ torrent -> setAnnounce ( ' http://tracker.example:1234 ' );
// list files
foreach ( $ torrent -> v1 ()-> getFiles () as $ file ) {
echo implode ( ' / ' , $ file -> path ()) , ' : ' , $ file -> length , PHP_EOL ;
}
基於該函式庫的 CLI 工具:https://sandfox.dev/php/torrent-file-cli.html
在此處閱讀完整文件:https://sandfox.dev/php/torrent-file.html
另請閱讀文件:https://torrent-file.readthedocs.io/
請在 GitLab 的主儲存庫上提交問題:https://gitlab.com/sandfox/torrent-file/-/issues
如果有任何問題,請隨時在我們的 Gitter 房間裡提問:https://gitter.im/arokettu/community
支援的版本:
該庫根據 MIT 許可證條款作為開源提供。