function PRVT_getBytes( &$data, $pos, $num )
    {
        // return the integer represented by $num bytes from $pos within $data
        $ret = 0;
        for ( $i = 0; $i < $num; $i++ )
        {
            $ret = $ret * 256;
            $ret+= ord( $data[$pos+$i] );
        }
        return $ret;
    }