View Single Post
Old 30.07.2007, 19:43   #4
ateh
Архивный участник
 
Join Date: Apr 2006
Posts: 118
Default

Code:
function Mbin2string($binstr)
{
	$out = "0x";
	for($q=0; $q < strlen($binstr); $q++) {
		$w = dechex(ord($binstr[$q]));
		if(strlen($w)==1) $w = '0'.$w;
		$out .= $w;
	}
	$out	= strtoupper($out);
	$out[1]	= 'x';
	return $out;
}
put your binary result as parameter to this function and you will see the hex string.
ateh is offline