I'll just leave it here.
PHP Code:
function ReadSteamID64( $SteamID64 )
{
if( !is_numeric( $SteamID64 ) ) return null;
$binary = str_pad( bcdecbin( $SteamID64 ), 64, '0', STR_PAD_LEFT );
return array(
'account' => bindec( substr( $binary, -32 ) ),
'instance' => bindec( substr( $binary, -52, 20 ) ),
'type' => bindec( substr( $binary, -56, 4 ) ),
'universe' => bindec( substr( $binary, -64, 8 ) )
);
}
function BCDecBin( $i )
{
bcscale( 0 );
$o = '';
do
{
$o = bcmod( $i, 2 ) . $o;
$i = bcdiv( $i, 2 );
}
while( bccomp( $i, 0 ) );
return $o;
}
__________________