

However, this returns System.Byte instead of encoded data which I can then decode in PHP. So to get the field that contains the picture data I am currently usingthe above code. I have access to this data via an API which includes a SQL query function using HTTP/cURL defined as follows: The client has a POS system which is based on ASP.NET and saves the data as XML files on the remote server. (nb:I've replaced the IP and $server with xxxxx for security) I've had a few downvotes for questions and I'm not too sure why so if this is a bad question I'm sorry, I just really need some help with this one. I am guessing that I need to use the DECODE() function in PostgreSQL to convert the data in the query? However, I've tried loads of combinations but I'm stuck. Thus if I use base64_decode() in PHP I am obviously just decoding the string "System.Byte". The response I get from this is: System.Byte

Pass results to the SimpleXMLElement function Assign execution of curl object to a variable $options = array(CURLOPT_URL => "$server&query=$myquery+limit+1",ĬURLOPT_HEADER => "Content-Type:application/xml", I'm using the following to query the DB for the PICTURE field from the PICTURE table where the PART = 01000015 $ch = curl_init() I know storing images this way in a DB is not a great idea but that's how the client's system works and it can't be changed as it is a part of an enterprise solution provided by a 3rd Party. I am working with an API to connect to a client's stock system which returns XML data. The data type is bytea and I need to get the data via cURL. I am having an issue converting an image stored as base64 in a PostgreSQL database into an image to display on a website.
