Tip: Click lines to highlight, hold ctrl/cmd to multi-select
http://codedumper.com/uruqo (14-Aug @ 17:36)
Syntax Highlighted Code
- <?php
- foreach ($songs as $mp3file)
- {
- //Get the filename of the song
- //Get the song
- {
- }
- //Save the song
- file_put_contents($filename,$filecontent);
- echo "---------------------------------------";
- }
- ?>
Plain Code
<?php
foreach ($songs as $mp3file)
{
//Get the filename of the song
$temp_filename = explode('/',$mp3file);
$filename = $temp_filename[count($temp_filename)-1];
$filename = urldecode($filename);
echo "Start downloaden ".$filename."<br>";
//Get the song
if(!$filecontent = @file_get_contents($mp3file))
{
echo "Downloaden niet voltooid! ".$filename;
}
//Save the song
file_put_contents($filename,$filecontent);
echo "Downloaden voltooid: ".$filename."<br>";
echo "---------------------------------------";
}
?>