« Back to Product

Documentation

IPS_GetMediaContent

Require: IP-Symcon >= 3.1

 string IPS_GetMediaContent (int $MediaID) 

Parameters

MediaID

ID of the media object whose content should be returned

Returns

Returns the content of the media object coded in Base64

Description

This command returns the Base64 coded content of the media object with the ID MediaID. The content is read from the file that is defined in the media object.

Warning

A useful example for this function is to provide the content to an external application that cannot access the file system via the JSON-RPC API.

Example

$Content = base64_decode(IPS_GetMediaContent(12345));
Any questions?