- chunk_split: documentation ( source)
- chr: documentation ( source)
- bindec: documentation ( source)
- str_replace: documentation ( source)
- explode: documentation ( source)
<?php
FUNCTION bin2text($bin_str)
{
$text_str = '';
$chars = EXPLODE("\n", CHUNK_SPLIT(STR_REPLACE("\n", '', $bin_str), 8));
$_I = COUNT($chars);
FOR($i = 0; $i < $_I; $text_str .= CHR(BINDEC($chars[$i])), $i );
RETURN $text_str;
}