Download the PHP package christeredvartsen/php-bittorrent without Composer
On this page you can find all versions of the php package christeredvartsen/php-bittorrent. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download christeredvartsen/php-bittorrent
More information about christeredvartsen/php-bittorrent
Files in christeredvartsen/php-bittorrent
Package php-bittorrent
Short Description A set of components that can be used to interact with torrent files (read+write) and classes that can encode/decode to/from the BitTorrent format.
License MIT
Homepage https://github.com/christeredvartsen/php-bittorrent
Informations about the package php-bittorrent
PHP BitTorrent
PHP BitTorrent is a set of components that can be used to interact with torrent files (read+write) and encode/decode to/from the BitTorrent format.
Requirements
PHP BitTorrent requires PHP 7.2 or above.
Installation
PHP BitTorrent can be installed using Composer:
composer require christeredvartsen/php-bittorrent ^2.0
Using the PHP BitTorrent API
Encode PHP variables
There is also a convenience method simply called encode
in the BitTorrent\Encoder
class that can be used to encode all encodable variables (integers, strings and arrays).
Decode BitTorrent encoded data
There is also a convenience method called decode
that can decode any BitTorrent encoded data.
Decode torrent files
The decoder class also has a method for decoding a torrent file (which is an encoded dictionary):
Create new torrent files and open existing ones
The BitTorrent\Torrent
class represents a torrent file and can be used to create torrent files.
The class can also load a torrent file:
License
Licensed under the MIT License.
See LICENSE file.