I'm not familar with how LDAP works, so my comments are more general coding type ones. I suggest first checking your connection for error messages by removing this bit > echo Header("Content-Type: image/jpg").$data; That should then mean that the php error messages become visable (or, if there are none, a blank page will be displayed. Secondly, I didn't think you used echo with the header function. Instead, I normally do this: Header( "Content-Type: image/jpg" ); echo $data; This may or may not fix your problem, but some help is better than none! With any luck someone with more experiance in this field will read your email in the not to distant future. Stephen ----- Original Message ----- From: "Simon Taylor" <simon@genient.com> To: <php-windows@lists.php.net> Sent: Wednesday, September 10, 2003 1:19 PM Subject: Extracting images from active directory using php > Hi All, > I am busy trying to display an image extracted from the active directory on > our intranet. This is what I have so far, I have searched the net on this > and come up with very little info. > The following just shows a page stating it could not display the image > because it had errors. If anyone has had experience with this please help... > > <?php > $ldap_server = 'ldap://server.world.com'; > $auth_user = 'joe@world.com'; > $auth_pass = 'password'; > > $res=ldap_connect($ldap_server); > $bind=ldap_bind($res,$auth_user,$auth_pass); > > $info = ldap_read($res,'CN=Joe > Bloggs,OU=Users,DC=world,DC=com','objectclass=*'); > > > $ar = ldap_get_entries($res,$info); > $data = $ar[0]['thumbnailphoto'][0]; > > echo Header("Content-Type: image/jpg").$data; > ?> > > Cheers > Simon > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php