title: Download MP3 file on click
body: <p>Being a new coder I keep doing a lot of trial and errors and stick with the finds that work, how ever the method I have at the moment does not work with all browsers.</p>
  
  <p>Our PHP code.</p>
  
  <pre><code>$songs = file_get_contents('https://example.com/tracks/'.$id.'/');
  $filename = './tmp/'.$SongTitle.'.mp3'; // used for the file_put_contents.
  $filenames = '/tmp/'.$SongTitle.'.mp3'; // used for the echo
  file_put_contents($filename, $songs);
  </code></pre>
  
  <p>HTML Download Button.</p>
  
  <pre><code>&lt;div style="text-align: center; font-size: 20px;" class="testing-content"&gt;
  &lt;button type="button" class="btn btn-success"&gt;&lt;a href="&lt;?php echo $filenames; ?&gt;" download='&lt;?php echo $filenames; ?&gt;' href="javascript:"&gt;Download&lt;/button&gt;&lt;/a&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>You can see that I am using the <em>Html5</em> and the <em>Javascript</em> method above meaning it only has support on FireFox and Google Chrome.</p>
  
  <p>How can I allow users on all browsers to download the file on click of our button?</p>