In article <000801c2658b$6ae22420$f7fea8c0@chris>, [EMAIL PROTECTED] 
says...
> Hi there everyone,
> 
> How can I import binary data - say from a gif file, into a string or array in PHP?  
>I can do text files/csv etc ..... but using the same method it won't do binary (I'm 
>sure for some obvious reason).
> 
> Thanks for your help
> 
> Chris

fread() is documented as being binary safe - is that what you have tried? 
This example is in the docs:

$filename = "c:\\files\\somepic.gif";
$fd = fopen ($filename, "rb");
$contents = fread ($fd, filesize ($filename));
fclose ($fd); 

-- 
David Robley
Temporary Kiwi!

Quod subigo farinam

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to