imap_binary

(PHP 3 >= 3.0.2, PHP 4, PHP 5)

imap_binary --  Convert an 8bit string to a base64 string

Description

string imap_binary ( string string )

Convert an 8bit string to a base64 string (according to RFC2045, Section 6.8).

Returns a base64 string.

See also imap_base64().


add a note add a note User Contributed Notes
Oliver
20-May-2006 08:34
You should prefer this function to base64_encode(), given you need it for mail encoding. The return value of this function contains <CRLF>after every 76 characters, as required for mail.
support2 at lofthouse dot com
27-Dec-2001 09:44
Having trouble with reading a file and encodeing it, but the encoding doesnt turn out right?
Before reading the file, use:
set_magic_quotes_runtime(0);
see also:
http://www.php.net/manual/en/function.fread.php