SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    psycho
    Join Date
    May 2000
    Location
    London
    Posts
    283
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am going to make a simple newsletter list for my site. I contacted my host about the fact that the server would stop the process because it was using too much CPU, and got this reply :

    "Can you throw a little delay in the script so its not sending every 1/10th of a
    second? If you can spread them out a little it should be ok."

    How would I go about this in PHP ?

    I would rather not have 100 sent, then click a link, then the next 100 are sent. What other ways do you suggest of achieving this ?

    thanks
    James

    PS - is it just me, or is this whole thing a bit stupid anyway ? Since when a mail() going 400 times gonna grind the system to a halt ? I thought this stuff was made for this sort of thing !

  2. #2
    SitePoint Wizard
    Join Date
    Jul 1999
    Location
    Chicago
    Posts
    2,629
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Check out usleep() and sleep().

    http://php.net/manual/html/function.sleep.html

  3. #3
    psycho
    Join Date
    May 2000
    Location
    London
    Posts
    283
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    cheers

    nice to see you back at sp

    James


Bookmarks

Posting Permissions

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