I searched google for my problem but found no solution. I want to read a file and convert the buffer to binary like 10001011001011001.
If I have something like this from the file
bmoov���lmvhd�����(tF�(tF�_�
K�T��������������������������������������������@���������������������������������trak���\tkh
d����(tF�(tF������� K������������������������������������������������@������������$edts��
How can I convert all characters (including also this stuff ��) to 101010101000110010 representation??
I hope someone can help me :)
pack. You should be able to do something likepack("h", $myString)to get a hexadecimal representation.unpack, buthis not the right format specifier according to the question and I think pack/unpack does not have one for this in PHP.