title: Query WMI remotely with PHP
body: <p>My current code looks like this:</p>
  
  <pre><code>define ( 'CPU_NAME', 'remote_server' );
  $obj = new COM ( 'winmgmts:{impersonationLevel=impersonate}//' . CPU_NAME . '/root/cimv2' );
  if ( is_object ( $obj ) ){ 
       $process = $obj-&gt;execquery ( "SELECT * FROM Win32_Process" );
  }
  </code></pre>
  
  <p>Where would I put the login credentials for the remote_server?
  I see that it would take a username and password, but I'm not sure how to implement that.</p>
  
  <p>Any help would be appreciated.</p>
  
  <p>Reference: <a href="http://us3.php.net/manual/en/class.com.php" rel="noreferrer">http://us3.php.net/manual/en/class.com.php</a></p>