[drupal-devel] OT: Binary data.

Carl McDade carl_mcdade at yahoo.com
Tue Mar 15 15:15:04 UTC 2005


I know this is possible in VBscript so PHP being more powerful should be
able to do it. It might take some thinking though.

Here's a 2binary string converter:

http://www.phpfreaks.com/quickcode/code/244.php

That is the one part done.

Carl McDade

Karoly Negyesi wrote:
>> fgets and fread are binary safe as I know. But there is no function 
> to
>> calculate the binary size of the data. You have to do this manually.
> 
>>From the User Contributed Notes on fwrite:
> 
> note that fwrite() is binary-safe with strings only - you cannot write 
> binary data with it (ie 32-bit integers, 1 (d)word etc)
> Trying to fwrite() an int will cause the int to be converted into 
> string and 
> then written as string.
> 



More information about the drupal-devel mailing list