Graham Anderson wrote:
How do you display raw binary data of a file sent from a server with curl ?

You can probably just use file_get_contents() if allow_url_fopen is enabled (it is by default).

For binary data, base64_encode and it's friend base64_decode allow you to encode and decode binary data in a normal ASCII string.

http://php.net/file_get_contents
http://php.net/base64_encode

I want to encrypt the file with something akin to str_replace and decode it on the other side with a custom data handler Just want to make sure that I am str_replace'ing the actual data and not a representation of it :)

str_replace is not for encryption. You might want to look at mcrypt, as using str_replace is probably just as bad as sending the unencrypted string. It's not going to be secure.

http://php.net/mcrypt

--
Jasper Bryant-Greene
Freelance web developer
http://jasper.bryant-greene.name/

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

Reply via email to