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);

Comments

Popular Posts