torrent file
5.3.1
Uma classe PHP para trabalhar com 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 ;
}
Uma ferramenta CLI baseada na biblioteca: https://sandfox.dev/php/torrent-file-cli.html
Leia a documentação completa aqui: https://sandfox.dev/php/torrent-file.html
Também em Leia os documentos: https://torrent-file.readthedocs.io/
Registre os problemas em nosso repositório principal no GitLab: https://gitlab.com/sandfox/torrent-file/-/issues
Sinta-se à vontade para fazer qualquer pergunta em nossa sala no Gitter: https://gitter.im/arokettu/community
Versões suportadas:
A biblioteca está disponível como código aberto sob os termos da licença MIT.