Hi,
I wanted to know if there are funs. in php that would let me manipulate binary strings? Actually, I want to check whether a given integer string (14 digits long) is a multiple of 8 bytes or not. If not I need to append to the string.
I have been looking for a long time now, but could not find anything useful. decbin() does not work for me cos of the restriction that the largest number could be 4294967295. In my case it would always be larger than that.
Any help would be greatly appreciated.
Thanks.

    I may have misunderstood, but why not just get the length of the integer string, then see if 8 divides into it:

    if (str_len($ints) % 8 == 0) {
    // length is a multiple of 8
    } else {
    // it's not a multiple
    }

      Sorry, that should be strlen(), not str_len().

        Write a Reply...