|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2001-07-18 09:53 UTC] stsit at szonline dot net
I have a binary data in LDAP,(the data is 570k) when i use $data=ldap_get_values_len() to get the data, i found that $data[0] has 33k,i think because it have "00" in the binary data. how can i do? PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 16:00:01 2025 UTC |
This is precisely why ldap_get_values_len() exists. I use the following code to extract pictures: ds=ldap_connect($host); $r=ldap_bind($ds); $sr=ldap_read($ds, $dn, "objectClass=*", array("jpegphoto")); if ($sr) { $ei=ldap_first_entry($ds, $sr); if ($ei) { $info = ldap_get_values_len($ds, $ei, "jpegphoto"); header("Content-type: image/jpeg"); } echo $info[0]; } ldap_unbind($ds); If this doesn't work, show me your exact script and if possible give me host, port and dn for your server so I can try. If you want to try against my server, try for instance ldap.uninett.no with the DN cn=Anders Lund,o=DUNINETT,dc=Duninett,dc=no