This question was created because my last question was marked as a duplicate when it wasn't a duplicate.
I have a GET API call that is returning back a UTF-8 PNG image. I am making the call from PHP and want to display the PNG thumbnail embedded in the webpage. Can someone help me figure out how to display the image inline with the rest of the webpage? So far I am just taking the CURL response and echoing it out to the page. Here is what I see. Thank you in advance.
$curl = curl_init();
curl_setopt($curl,CURLOPT_URL,'$url');
curl_setopt($curl,CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl,CURLOPT_USERAGENT,'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17');
curl_setopt($curl,CURLOPT_HEADER, true);
curl_setopt($curl, CURLOPT_VERBOSE, 1);
$headers = array( 'X-Tableau-Auth: ' . $GLOBALS['authToken'] );
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
$resp = curl_exec($curl);
echo $resp;
$header_size = curl_getinfo($curl, CURLINFO_HEADER_SIZE);
$header = substr($resp, 0, $header_size);
$body = substr($resp, $header_size);
echo $body;
curl_close($curl);
