Hi.
Is it possible read an Byte Array in php?
I'm writing a interface to Microsoft Reporting Services in PHP. I'm communication with the Reporting Service Web Service with SOAP. But the data I get from the Render() function is apparently an Byte Array. So at the moment it looks only cryptic, I need to make it readable 🙂
I can show the beginning of the return data I get:
HTTP/1.1 200 OK Server: Microsoft-IIS/5.1 Date: Tue, 08 Nov 2005 13:37:41 GMT X-Powered-By: ASP.NET X-AspNet-Version: 1.1.4322 Cache-Control: private, max-age=0 Content-Type: text/xml; charset=utf-8 Content-Length: 171266 <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Header><ServerInfoHeader xmlns="http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingservices"><ReportServerVersionNumber>Microsoft SQL Server Reporting Services Version 8.00.1038.00</ReportServerVersionNumber><ReportServerEdition>Developer</ReportServerEdition></ServerInfoHeader><SessionHeader xmlns="http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingservices"><SessionId>j1fqvm55ymdl1j451hjzcz55</SessionId><IsNewExecution>true</IsNewExecution><ExecutionDateTime>2005-11-08T14:37:39</ExecutionDateTime><ExpirationDateTime>2005-11-08T14:37:41</ExpirationDateTime></SessionHeader></soap:Header><soap:Body><RenderResponse xmlns="http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingservices"> <Result>PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMDEgVHJhbnNpdGlvbmFs Ly9FTiI+DQo8aHRtbD4NCjxoZWFkPg0KPHRpdGxlPg0KSGVscGRlc2tBY3Rpdml0eUxpc3RQZXJY DQo8L3RpdGxlPg0KPE1FVEEgaHR0cC1lcXVpdj0iQ29udGVudC1UeXBlIiBjb250ZW50PSJ0ZXh0 L2h0bWw7IGNoYXJzZXQ9dXRmLTgiPg0KPE1FVEEgaHR0cC1lcXVpdj0iQ29udGVudC1TdHlsZS1U eXBlIiBjb250ZW50PSJ0ZXh0L2NzcyI+DQo8TUVUQSBodHRwLWVxdWl2PSJDb250ZW50LVNjcmlw dC1UeXBlIiBjb250ZW50PSJ0ZXh0L2phdmFzY3JpcHQiPg0KPE1FVEEgSFRUUC1FUVVJVj0iTG9j [and ALOT more giberish before the end tag :queasy:] </Result>
base64_decode to get your binary data
Exelent! That worked, thanks :-)