Downloading content with file_get_contents then deleting after
<p>Currently I found this site for music related tools that is very handy it offers a mirror for file hosts, and I am trying to download some MP3 with file_get_contents and delete it afterwards pushed to this file host mirror.</p>

<p>current code have is this.. </p>

<pre><code>$mp3 = 'http://www.example.com/song.mp3';
$name = 'song';
file_put_contents('tmp/'.$name.'.mp3',file_get_contents($mp3));
</code></pre>

<p>Which will store the MP3 we're trying to gather, but after it saves this information I want it to run through the function on this file mirror we found <a href="https://www.filemack.com/en/api" rel="nofollow noreferrer">API</a> then delete the MP3 file from our tmp directory afterwards.</p>

<p>the site is filemack </p>