1<?php
2require_once 'connect.inc';
3
4if ($skip_on_bind_failure) {
5
6    $link = ldap_connect($host, $port);
7    ldap_set_option($link, LDAP_OPT_PROTOCOL_VERSION, $protocol_version);
8    if (!@ldap_bind($link, $user, $passwd))
9        die(sprintf("skip Can't bind to LDAP Server - [%d] %s", ldap_errno($link), ldap_error($link)));
10
11    ldap_unbind($link);
12}
13?>
14