bencoding
- general
This class is for encoding php types to the bencode syntax and
decoding a bencode string to php types. You need this if you
want to create/read a torrent file or create responses for a
tracker. For more informations about bencode goto:
http://bittorrent.org/beps/bep_0003.html
I have developed this class for my framework psx <http://phpsx.org>
but you can also use this outside.
- description
The following php/bencoding types are accosiated
Type Bencode PHP
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
String 4:spam 'spam'
Integer i3e 3
List l4:spam4:eggse array('spam', 'eggs')
Dictionarie d3:cow3:moo4:spam4:eggse array('cow' => 'moo', 'spam' => 'eggs')
|