Extracting images from active directory using php

From: Date: Wed, 10 Sep 2003 12:19:03 +0000
Subject: Extracting images from active directory using php
Groups: php.windows 
Request: Send a blank email to php-windows+get-21339@lists.php.net to get a copy of this message
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

« previous php.windows (#21339) next »