Base64 API Reference

 Handle the Base64 encoding. The Base64 encoding is useful function, when store binary data as text. This function is actually used in storing result image of the heat map.

There are decoder and encoder functions. The decoded output is script's variable or file. And the encoded result is returned as a script variable of string type.

Base64 format is used to convert binary data into text data. It is used at attachment file of the internet mail. It is also available to store binary data into the database in clob format.

Alinous-Core supports this function by standard functions, and it can encode and decode data. The data can be text or file.

decode($str, $encode)

 The "base64.decode()" function decodes $str written in base64 format, and return it. This function returns the decoded binary as string.

decode2File($str, $pathname)

 The "base64.decode2File()" function decodes $str written in base64 format, and store it into file. For example, you can get the encoded string, which was image data before encoded,  from the database, and encode it and make decoded file.

encode($str, $encode)

 The "base64.encode()" function encodes $str in base64 format, and return it.

encodeFromFile($pathname)

 The "base64.encodeFromFile()" function encodes $pathname in base64 format, and return it.


Go to Top