I am facing one issue regarding killing a Linux process from my php code. I am running a Scrapy tool from my php code using the proc_open() function in the back
proc_open()
You can use exec with sudo privileges for skill that is more safer check out kill users processes in linux with php
Thanks & Regards, Alok Thaker