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