PHP: ldap_get_option - Manual

downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

ldap_get_values_len ldap_get_entries

Last updated: Sat, 27 Jan 2007

view this page in

# ldap_get_option

(PHP 4 >= 4.0.4, PHP 5)

ldap_get_option -- Get the current value for given option

## Description

bool ldap_get_option ( resource link_identifier, int option, mixed &retval )

Sets `retval` to the value of the specified option. Возвращает `TRUE` в случае успешного завершения или `FALSE` в случае возникновения ошибки.

The parameter `option` can be one of: LDAP_OPT_DEREF, LDAP_OPT_SIZELIMIT, LDAP_OPT_TIMELIMIT, LDAP_OPT_PROTOCOL_VERSION, LDAP_OPT_ERROR_NUMBER, LDAP_OPT_REFERRALS, LDAP_OPT_RESTART, LDAP_OPT_HOST_NAME, LDAP_OPT_ERROR_STRING, LDAP_OPT_MATCHED_DN. These are described in draft-ietf-ldapext-ldap-c-api-xx.txt

> Замечание: This function is only available when using OpenLDAP 2.x.x OR Netscape Directory SDK x.x, and was added in PHP 4.0.4

Пример 1. Check protocol version

`<?php
// $ds is a valid link identifier for a directory server
if (ldap_get_option($ds, LDAP_OPT_PROTOCOL_VERSION, $version)) {
echo "Using protocol version $version\n";
} else {
echo "Unable to determine protocol version\n";
}
?>`

See also ldap_set_option().

add a note User Contributed Notes
ldap_get_option
radovanr at NOSPAM dot zl dot cz
24-Jan-2002 05:27
`It is good idea to say something about default values. What values are used, when they aren't set exactly using ldap_set_option?`
add a note
ldap_get_values_len ldap_get_entries

Last updated: Sat, 27 Jan 2007
show source | credits | stats | sitemap | contact | advertising | mirror sites
Copyright © 2001-2007 The PHP Group
All rights reserved.
This mirror generously provided by: Yahoo! Inc.
Last updated: Sat Mar 10 09:32:46 2007 PST