I'm trying to send the binary representation of data through a PHP socket.
So if the number was 15, socket_write would send 00001111 as binary representation for 15.
How should I do this?
You can use the decbin($nr) to convert a number into a binary. Then, send the result.
More about decbin() on this address:
This topic is now closed. New replies are no longer allowed.