How do you retrive drives and net work connections?

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

    How do you retrive drives and net work connections?

    I want to retrieve a list of all the drives (HD, CD-ROM, Removable,
    etc) and also network connections/mappings and shares connected to the
    computer which is Windows XP.

    I am trying to avoid using FileSystemObjec t if possible. Is there
    anyway of doing this with PHP extensions?

    My other thought would be to use exec() or a Java applet.

    Any one of code that does this already or have any ideas how it could
    be done?

    Thanks.

  • milahu

    #2
    Re: How do you retrive drives and net work connections?

    Do you want the client's or the server's drives? To get the latter one,
    you could use PHP's exec, otherwise you need a Java Applet.

    Comment

    • ImOk

      #3
      Re: How do you retrive drives and net work connections?


      milahu wrote:[color=blue]
      > Do you want the client's or the server's drives? To get the latter one,
      > you could use PHP's exec, otherwise you need a Java Applet.[/color]

      Only the client's. What would the command be to use exec() to get list
      of drives?

      Comment

      • Tim Roberts

        #4
        Re: How do you retrive drives and net work connections?

        "ImOk" <j_macaroni@yah oo.com> wrote:[color=blue]
        >
        >milahu wrote:[color=green]
        >> Do you want the client's or the server's drives? To get the latter one,
        >> you could use PHP's exec, otherwise you need a Java Applet.[/color]
        >
        >Only the client's. What would the command be to use exec() to get list
        >of drives?[/color]

        You can't do it. All of your PHP code, including the exec() function, runs
        on the SERVER.

        To enumerate the disk drives on a client computer, you have to send a
        program to the client. That means using a Java or ActiveX applet. The
        user will have to specifically override the security settings to allow that
        to happen.
        --
        - Tim Roberts, timr@probo.com
        Providenza & Boekelheide, Inc.

        Comment

        • ImOk

          #5
          Re: How do you retrive drives and net work connections?

          Sorry I confused this. You are right it would be the SERVER i.e. the
          computer PHP is actiually executing on. I would like to have PHP return
          back to me the list of drives and shares to my browser.

          Tim Roberts wrote:[color=blue]
          > "ImOk" <j_macaroni@yah oo.com> wrote:[color=green]
          > >
          > >milahu wrote:[color=darkred]
          > >> Do you want the client's or the server's drives? To get the latter one,
          > >> you could use PHP's exec, otherwise you need a Java Applet.[/color]
          > >
          > >Only the client's. What would the command be to use exec() to get list
          > >of drives?[/color]
          >
          > You can't do it. All of your PHP code, including the exec() function, runs
          > on the SERVER.
          >
          > To enumerate the disk drives on a client computer, you have to send a
          > program to the client. That means using a Java or ActiveX applet. The
          > user will have to specifically override the security settings to allow that
          > to happen.
          > --
          > - Tim Roberts, timr@probo.com
          > Providenza & Boekelheide, Inc.[/color]

          Comment

          Working...