View Full Version : How to pause a script

06-10-2007, 09:41 PM
So I have a script that file_get_contents() a series of pages in a for loop. My problem is that I get locked out and am unable to request the pages if I request them at the speed that the script runs.

I was wondering if anyone knew how I could pause my loop at the end, just for like a second or half a second.

I know in java you can do thread.sleep(20), for 20ms. Was wondering if there is anything similar in PHP.

06-10-2007, 10:08 PM