thank you all ...
i now got all groups and all users and everything you need from ldap , there is afree class on internet adldap class ,here is the link :
http://adldap.sourceforge.net/download.php
there is many versions i used version 2.1 in the folder there is a file called examples you can uncomment any script to use it , it uses all function which are defined in adldap file(which is the class), examples.php includes the class , and starts using functions.
you have to open adldap class and edit the connect and bind functions and set them to you'r domain and user name and password.
you have to set you'r info in these lines in the adldap class in the
constructor
//connect to the LDAP server as the username/password
$dc=$this->random_control ler();
if ($this->_use_ssl){
<Here!> $this->_conn = ldap_connect("m ydomain.com");
} else {
$this->_conn = ldap_connect($d c);
}
//bind as a domain admin if they've set it up
if ($this->_ad_username!= NULL && $this->_ad_password!= NULL){
<and here!>
$this->_bind = @ldap_bind($thi s->_conn,"user@my domain.com","pw ");
//bind as the user
<also here!>
$this->_bind = @ldap_bind($thi s->_conn,"user@my domain.com","pw ");
if (!$this->_bind){ return (false); }
and because the informations returned sometimes very larg you have to add this line in the begining of the class
ini_set("memory _limit","17M");
which gives 17 mega byte for results .
try it ! and if any one faces problems i'am glad to give any help.....