15 Mar
2005
15 Mar
'05
4:15 p.m.
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.