Thursday, August 18, 2016

shell exec timeout

shell exec timeout


I was looking for an easy way to provide a timeout for a shell_exec command and came across this useful suggestion using the (you guessed it...) timeout command:

shell_exec("timeout ".$timeout_in_sec."s ".$your_cmd);

Go to link download