void set_time_limit ( int seconds ) sets how long a script should be allowed to execute.
<? set_time_limit(30); ?>