title: Change file name for download and start downloading it after click or delay
body: <p>I'm looking for php code that changes file name -adds current date, and starts download the file with delay. If download will not start there is an option to download the file with added date by clicking the link.</p>
  
  <p>Something like this:
  Your download will begin in a few moments... If nothing happens, click <code>&lt;a href=""&gt;here&lt;/a&gt;</code>.</p>
  
  <p>I found only this:</p>
  
  <pre><code>// It will be called downloaded.pdf
  header('Content-Disposition: attachment; filename="downloaded.pdf"');
  
  // The PDF source is in original.pdf
  readfile('plik.pdf');
  </code></pre>
  
  <p><a href="https://stackoverflow.com/a/6694505">https://stackoverflow.com/a/6694505</a></p>
  
  <p>Please help me.</p>