note 59736 added to function.ldap-get-attributes
| From: | cyril at feraudet dot com | Date: | Wed, 14 Dec 2005 15:34:50 +0000 |
| Subject: | note 59736 added to function.ldap-get-attributes | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-100143@lists.php.net to get a copy of this message | ||
A small function with a big regex to parse ldap uri (RFC 2255)
<?php
function ldap_get_uri_info($uri) {
$ldap_uri_regex = "a very big regex available at http://feraudet.com";
if(ereg($ldap_uri_regex,$uri,$reg))
return array('ssl'=>$reg[1]=='s'?1:0,
'port'=>$reg[17], 'host'=>$reg[3], 'base'=>$reg[18],
'attributes'=>$reg[137], 'filter'=>$reg[149],
'scope'=>$reg[147]);
return false;
}
?>
The regex is not here cause php.net doesn't accept too long line ...
Regex at http://feraudet.com/
Cyril Feraudet
----
Manual Page -- http://www.php.net/manual/en/function.ldap-get-attributes.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+59736
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+59736&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+59736&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+59736&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+59736&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+59736&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+59736&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+59736&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+59736&report=yes
Search -- http://master.php.net/manage/user-notes.php