Cycle through multiple servers....
| From: | Christopher Ditty | Date: | Thu, 23 Jan 2003 16:24:18 +0000 |
| Subject: | Cycle through multiple servers.... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-132853@lists.php.net to get a copy of this message | ||
Hello all. I have a few servers that I need to check during a login process. If the first server
fails to connect, then I need to do server #2 and so on. Below is the code that I am using, but I
am unable to get it to work like it should. Can anyone offer some advice on how this should be
accomplushed?
Thanks
CDitty
function sConnect($serverID){
$ds = ldap_connect($serverID);
return $ds;
}
$i = 0;
do{
ldapConnect($config['ldapServer'][$i]);
$i++;
}while(!$ds && ($i < (count($config['ldapServer']) + 1)));