torrent file
5.3.1
Eine PHP-Klasse zum Arbeiten mit 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 ;
}
Ein CLI-Tool basierend auf der Bibliothek: https://sandfox.dev/php/torrent-file-cli.html
Lesen Sie die vollständige Dokumentation hier: https://sandfox.dev/php/torrent-file.html
Auch auf Read the Docs: https://torrent-file.readthedocs.io/
Bitte reichen Sie Probleme in unserem Haupt-Repo bei GitLab ein: https://gitlab.com/sandfox/torrent-file/-/issues
Fragen können Sie gerne in unserem Raum auf Gitter stellen: https://gitter.im/arokettu/community
Unterstützte Versionen:
Die Bibliothek ist als Open Source unter den Bedingungen der MIT-Lizenz verfügbar.