0

I use a php script to query our LDAP and output the results to HTML - now I also want to get the thumbnailphoto but I struggle to convert the encoded image.

The image data looks like this: thumbnailphoto

$data = $ldapResults[$i]['thumbnailphoto'][0];
echo "<td>" .$data . "</td>";

I found this post @stackoverflow but I can't get it to work.

What do I need to do to display the image properly?

Thank you.

Community
  • 1
  • 1
Tony Clifton
  • 703
  • 3
  • 14
  • 27
  • What does not work for you with the examples posted in the other question? Please be aware that you cannot directly output binary image data into a `td` element. – Rangad Dec 04 '14 at 13:32
  • you can also see [this question](http://stackoverflow.com/questions/2070603/php-recreate-and-display-an-image-from-binary-data) is quite clear and you should know the type of the image – Akis Dec 04 '14 at 13:35
  • this: echo ''; gives me the following html: how do I need to modify this? – Tony Clifton Dec 04 '14 at 14:23
  • 1
    use this code: ```echo ''``` – heiglandreas Dec 04 '14 at 20:11

1 Answers1

0

I got it working with FILEINFO as described in the link above after testing some more. Thank you.

Pete
  • 1,305
  • 1
  • 12
  • 36
Tony Clifton
  • 703
  • 3
  • 14
  • 27