PHP Classes

bencoding: Serialize and unserialize values in bencode format

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  Info   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2009-04-02 (6 years ago) RSS 2.0 feedNot enough user ratingsTotal: 357 All time: 6,412 This week: 1,063Up
Version License PHP version Categories  
bencoding 1.0GNU General Publi...5.0PHP 5, Data types
Description Author  

This class can be used to serialize and unserialize values in bencode format.

It can take a variable value and encode it as a string that describes its type and value in the bencode format. It supports encoding strings integers and arrays.

The class can also do the opposite, i.e. take a string in the bencode format and restore the original variable value.

Picture of Christoph Kappestein
Name: Christoph Kappestein <contact>
Classes: 3 packages by
Country: Germany Germany
Age: ???
All time rank: 2575164 in Germany Germany
Week rank: 1609 Up77 in Germany Germany Up

	- 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:
	I have developed this class for my framework psx <>
	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')
  Files folder image Files  
File Role Description
Plain text file bencoding.php Class main class
Accessible without login Plain text file example.php Example example script
Accessible without login Plain text file readme.txt Doc. documentation

 Version Control Unique User Downloads Download Rankings  
 0%Total:357All time:6,412
 This week:0This week:1,063Up