I've done this one Windows. What's the problem?
You can:
a) list all processes (ps -u httpd_user), pick the one you desire, parse the PID out and kill the process (kill -9 pid)
b) keep the list of started processes in DB (or plaintext file) and pick PID from there
I'm not sure about user rights on Unix, but if PHP started some process I don't see why it shouldn't be able to kill it as well.