How do I rename the file in file_put_contents?
<p>I have this code snippet that grabs a SWF file and saves it locally. Works like a charm! However, I need to rename the file and have no idea how to do so. All help is greatly appreciated! Thanks!</p>

<pre><code>$filename = "filename"; //Without extension
$urls = array($swf_url);
foreach($urls as $url) {
   $data = file_get_contents($url);
   file_put_contents('/home/public/'.basename($url), $data);
}
</code></pre>
