title: Is it possible to get the PID of a process launched by exec() in Windows XP?
body: <p>I am using the <code>exec()</code> function to execute the same external programs, and I want to stop one of them in some case. But the following command:</p>
  
  <pre><code>taskkill /IM program.exe
  </code></pre>
  
  <p>will get all <code>program.exe</code> killed. So the best way I thought was to kill program process by its PID. </p>
  
  <p>So,I thought the way was to get the PID every time the program was executed, and then kill it.</p>
  
  <p>I am using PHP 5.3 on Windows XP.</p>