>hi there i was wondering if there was a way to limit the ammount of items in >a loop to execute sleep then execute the rest of the items to prevent server >load ?
http://php.net/sleep Note that "sleep" time doesn't count, but that if your program uses up *TOO* much time, it will be killed by PHP. The default setting is 30 seconds. You can alter it in php.ini or using http://php.net/set_time_limit If you want to sleep 10 seconds every 50 items it would be like this: $count = 0; while (...){ $count++; if (($count % 50) == 0){ sleep(10); } } -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php