https://github.com/arokettu/bencode
PHP Bencode (BitTorrent) Encoder/Decoder
https://github.com/arokettu/bencode
bencode bittorrent php-library torrent torrent-files
Last synced: 7 months ago
JSON representation
PHP Bencode (BitTorrent) Encoder/Decoder
- Host: GitHub
- URL: https://github.com/arokettu/bencode
- Owner: arokettu
- License: mit
- Created: 2017-03-22T20:00:10.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-10-11T15:26:29.000Z (9 months ago)
- Last Synced: 2024-12-10T02:11:02.429Z (7 months ago)
- Topics: bencode, bittorrent, php-library, torrent, torrent-files
- Language: PHP
- Homepage: https://sandfox.dev/php/bencode.html
- Size: 348 KB
- Stars: 22
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# PHP Bencode Encoder/Decoder
[](https://packagist.org/packages/arokettu/bencode)
[](https://packagist.org/packages/arokettu/bencode)
[](https://opensource.org/licenses/MIT)
[](https://gitlab.com/sandfox/bencode/-/pipelines)
[](https://codecov.io/gl/sandfox/bencode/)[Bencode] is the encoding used by the peer-to-peer file sharing system
[BitTorrent] for storing and transmitting loosely structured data.This is a pure PHP library that allows you to encode and decode Bencode data.
## Installation
```bash
composer require 'arokettu/bencode'
```Supported versions:
* 4.x (current, PHP 8.1+)
## Simple use
```php
['length' => 12345, 'name' => 'Bencoded demo']]);
\Arokettu\Bencode\Bencode::decode('d4:infod6:lengthi12345e4:name13:Bencoded demoee');
```## Documentation
Read full documentation here:
Documentation for all past major versions can be found on Read the Docs:
* 1.x:
* 2.x:
* 3.x:
* 4.x:## Support
Please file issues on our main repo at GitLab:
Feel free to ask any questions in our room on Gitter:
## License
The library is available as open source under the terms of the [MIT License].
[Bencode]: https://en.wikipedia.org/wiki/Bencode
[BitTorrent]: https://en.wikipedia.org/wiki/BitTorrent
[MIT License]: https://opensource.org/licenses/MIT