$server = "ldaps://toto.locall/";
$port = "toto";
$racine = "ou=alias,ou=people,dc=local";
$ad = ldap_connect($server, $port) ;
$filter="(|(sn=*)(givenname=*))";
$justthese = array( "ou", "givenname", "o", "mail" );
$sr=ldap_search($ad, $racine, $filter, $justthese);
$info = ldap_get_entries($ad, $sr);
$total = $info["count"];
for ($i=0; $i<=$total; $i++){
$mail = $info[$i]['mail'][0];
$givenName = $info[$i]['givenname'][0];
$o = $info[$i]['o'][0];
$alias_internes["$givenName"] = $o;
echo $alias_internes["$givenName"]; // Visible
}
echo $alias_internes["$givenName"]; // Plus Visible ??
ldap_close($ad);