string encode_array(
array
$array)
|
|
BEncodes an array This code assumes arrays with purely integer indexes are lists, arrays which use string indexes assumed to be dictionaries.
Dictionaries are prefixed with a d and terminated by an e. They are similar to list, except that items are in key value pairs. The dictionary {"key":"value", "Monduna":"com", "bit":"Torrents", "number":7} would bEncode to d3:key5:value7:Monduna3:com3:bit:8:Torrents6:numberi7ee
Lists are prefixed with a l and terminated by an e. The list should contain a series of bEncoded elements. For example, the list of strings ["Monduna", "Bit", "Torrents"] would bEncode to l7:Monduna3:Bit8:Torrentse. The list [1, "Monduna", 3, ["Sub", "List"]] would bEncode to li1e7:Mondunai3el3:Sub4:Listee
Parameters:
string encode_int(
int
$int)
|
|
BEncodes a integer
Integers are prefixed with an i and terminated by an e. For example, 123 would bEcode to i123e, -3272002 would bEncode to i-3272002e.
Parameters: