How do i make a Php script terminate after a fixed amount of time
+4
A:
Using the max_execution_time setting in PHP.
Ie:
ini_set('max_execution_time', 30);
Would end the script after 30 seconds of execution (this is default in PHP)
You could also use:
set_time_limit(30);
See: http://php.net/manual/en/function.set-time-limit.php and http://www.php.net/manual/en/info.configuration.php#ini.max-execution-time
Sbm007
2009-11-06 21:52:57