title: Php, wait 5 seconds before executing an action
body: <p>I have a .php script that I use for creating the list of my products.
  I am on shared hosting, so I can't do a lot of queries otherwise I get a blank page.</p>
  
  <p><strong>This is how I use my script now:</strong></p>
  
  <pre><code>script.php?start=0&amp;end=500&amp;indexOfFile=0  -&gt;&gt; make a product0.txt file with first 500 products
  
  script.php?start=501&amp;end=1000&amp;indexOfFile=1 -&gt;&gt; product1.txt file with another 500 products
  
  script.php?start=1001&amp;end=1500&amp;indexOfFile=2 -&gt;&gt; product2.txt file with last 500 products
  </code></pre>
  
  <p>How can I modify the script so it will make all these files automatically, so that I don't have to change each time the link manually?</p>
  
  <p>I would like to click a button which will do this:</p>
  
  <p>make the <code>product0.txt</code> file with the first 500 products</p>
  
  <p>wait 5 seconds</p>
  
  <p>make the <code>product1.txt</code> file with with another 500 products</p>
  
  <p>wait 5 seconds</p>
  
  <p>make the <code>product2.txt</code> file with the last 500 products</p>