ADSI with PHP

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Kevin Otte

    #1

    ADSI with PHP

    Hi everyone,

    I'm pretty new to using the COM functionality in PHP.
    I want to administer my PC using PHP together with ADSI.
    My first problem is to enumerate the groups in my domain.
    I tried using the following but it didn't work:

    $objDomain = new COM("WinNT://mydomain") or die("Cannot find domain");
    $objDomain->filter = array("group");
    foreach($objDom ain as $group){
    echo $group->name."<br>\n ";
    }
    echo "Done";

    all i get is the "Done" from the last line.
    How can I get a list of the groups ?

    Thanks in advance


  • bjartea@hotmail.com

    #2
    Re: ADSI with PHP

    In case you have Active Directory in your domain, consider using LDAP.
    You'll find the documentation and related links on www.php.net


    Bjarte :-)


    [color=blue][color=green][color=darkred]
    >>> Kevin Otte<SPAMjarod1 701@gmx.de> 18.09.2003 19:45:29 >>>[/color][/color][/color]
    Hi everyone,

    I'm pretty new to using the COM functionality in PHP.
    I want to administer my PC using PHP together with ADSI.
    My first problem is to enumerate the groups in my domain.
    I tried using the following but it didn't work:

    $objDomain = new COM("WinNT://mydomain") or die("Cannot find domain");
    $objDomain->filter = array("group");
    foreach($objDom ain as $group){
    echo $group->name."<br>\n ";
    }
    echo "Done";

    all i get is the "Done" from the last line.
    How can I get a list of the groups ?

    Thanks in advance




    Comment

    • Kevin Otte

      #3
      Re: ADSI with PHP

      bjartea@hotmail .com <bjartea@_NO_SP AN_online_DOT_n o> wrote in message news:<D%qab.311 44$Hb.475837@ne ws4.e.nsc.no>.. .[color=blue]
      > In case you have Active Directory in your domain, consider using LDAP.
      > You'll find the documentation and related links on www.php.net
      >
      >
      > Bjarte :-)
      >
      >
      >[color=green][color=darkred]
      > >>> Kevin Otte<SPAMjarod1 701@gmx.de> 18.09.2003 19:45:29 >>>[/color][/color]
      > Hi everyone,
      >
      > I'm pretty new to using the COM functionality in PHP.
      > I want to administer my PC using PHP together with ADSI.
      > My first problem is to enumerate the groups in my domain.
      > I tried using the following but it didn't work:
      >
      > $objDomain = new COM("WinNT://mydomain") or die("Cannot find domain");
      > $objDomain->filter = array("group");
      > foreach($objDom ain as $group){
      > echo $group->name."<br>\n ";
      > }
      > echo "Done";
      >
      > all i get is the "Done" from the last line.
      > How can I get a list of the groups ?
      >
      > Thanks in advance[/color]

      Thanks for your answer !
      Using ADSI should not be to difficult.
      The only problem is that I don't know which expressions to use within
      the foreach-statement.

      Are there any concrete examples available on receiving groups or users
      under Windows 2000 using LDAP with PHP ?

      Comment

      Working...