[drupal-devel] OT: Binary data.

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


Hmm,

Scratch that then. Second suggestion. Create a shared object in C and
call it from PHP. Caveat though writing C so for Zend engine is not for
the meek mild mannered C programmer. You have to be tough ;)

I have only done this on windows so I can't help you with Linux.

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