Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Sep 2006
    Location
    Colorado
    Posts
    132
    Thanks
    7
    Thanked 1 Time in 1 Post

    How to pause a script

    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.
    -bubbles

  • #2
    Senior Coder kbluhm's Avatar
    Join Date
    Apr 2007
    Location
    Philadelphia, PA, USA
    Posts
    1,509
    Thanks
    3
    Thanked 258 Times in 254 Posts


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •