note 91251 modified in function.ldap-get-values-len by danbrown
| From: | danbrown@php.net | Date: | Tue, 02 Jun 2009 12:34:14 +0000 |
| Subject: | note 91251 modified in function.ldap-get-values-len by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-156286@lists.php.net to get a copy of this message | ||
Tried a couple of different ways to do this but this seems to work best:
<?php
$info = ldap_first_entry($ds,$sr);
// get it binary-safe.
$bin_guid = ldap_get_values_len($ds,$info,"objectguid");
// convert to hex, bin2hex failed here for me. Unpack() seems to work though.
$hex_guid = unpack("H*hex", $bin_guid[0]);
?>
--was--
Tried a couple of different ways to do this but this seems to work best:
$info = ldap_first_entry($ds,$sr);
// get it binary-safe.
$bin_guid = ldap_get_values_len($ds,$info,"objectguid");
// convert to hex, bin2hex failed here for me. Unpack() seems to work though.
$hex_guid = unpack("H*hex", $bin_guid[0]);
http://php.net/manual/en/function.ldap-get-values-len.php