I'm writing a Gnutella client in PHP and in order to create routing tables I need to store a bit inside a byte and then send those bytes across a file stream. However, I'm not sure how to convert what appears to be an integer byte to a bit. After I convert it though I think I would run it through the pack() function.
$byte = pack('c',0);
$byte = pack('c',1);
From the Limewire FAQ:
http://wiki.limewire.o rg/index.php?title =QRP...