I have function that run web-service and bring me binary file:
$params->xmlRequest = $paramsStr;
$result = $s->__call("SubmitXmlString",array($params));
$obj_pros = get_object_vars($result);
$xml = $obj_pros['SubmitXmlStringResult'];
$xml = simplexml_load_string($xml);
return ($xml);
example for response:
<PnrGetReportDoc ReportName="ExternalDocument">
<Report ID="6214" Type="pdf" Name="file name" IsCompressed="1">
<![CDATA[JVBERi0xLjcNCiW1tbW1DQoxIDAgb2JqDQo8PC9UeXBlL0NhdGFsb2cvUGFnZXMgMiAQolJU......................VPRg==]]>
</Report>
<ReportImages>
</ReportImages>
</PnrGetReportDoc>
I would like to ECHO the content in order to display the file
I tried to echo the binary but: 1. PDF isn't display
- binary characters start without the opening notes:
<![CDATA[
This is my php file where i'm trying to display the file:
header('Content-type: application/'pdf);
$fileData = get_file_data ($_GET['fileID']);
echo $fileData->Report;