XML-RPC Base64-Encoded Binary Data Type

To transfer binary information via XML-RPC we need to encode the data in base64 (serialization) and use the base64 tags as xml tags.

Example Declaration:

<param>
<value>
<base64>UHSYDhD1423Cc0Ad3NVP4OidTd8E1kRY5Edh</base64>
</value>
</param>

Since PHP does not have a binary data type, developers need to encode files in base64 for XML-RPC transfer by using the file_get_contents function.

Share Article/Example:
  • DotNetKicks
  • DZone
  • StumbleUpon
  • Print
  • Add to favorites
  • Digg
  • del.icio.us
  • Twitter
  • Facebook
  • LinkedIn
  • Posterous
  • Slashdot

Filed Under: PHP XML

Tags:

RSSComments (0)

Trackback URL

Leave a Reply




If you want a picture to show with your comment, go get a Gravatar.