torrent file
5.3.1
คลาส PHP ที่จะทำงานกับ torrent file
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/
โปรดยื่นปัญหาใน repo หลักของเราที่ GitLab: https://gitlab.com/sandfox/torrent-file/-/issues
อย่าลังเลที่จะถามคำถามในห้องของเราบน Gitter: https://gitter.im/arokettu/community
รุ่นที่รองรับ:
ห้องสมุดมีให้บริการในรูปแบบโอเพ่นซอร์สภายใต้เงื่อนไขของใบอนุญาต MIT