Soundcloud Playlist Downloader Zip Download
It’s super easy to download SoundCloud playlist songs with SC-Downloader. Copy the SoundCloud playlist link and just paste it in the above text box. Within a blink of an eye, for all the songs in the playlist, you will get a download link that you can download with names. Thus, SC-Downloader is the best tool for downloading SoundCloud. Download SoundCloud Playlists. Download multiple tracks or MP3 from any SoundCloud Playlist using SoundCloud Playlist Downloader. It's simple, free and very easy to use online tool. Just type or paste the playlist URL in the input box and hit the 'Download' button. Download YouTube, SoundCloud, Spotify in MP3 with tags (title, artist, cover, lyrics, genre.) and high quality! Soundcloud Downloader Online. Just simply add vi in front of soundcloud.com to download any tracks, sets and playlists from Soundcloud! Download from Soundcloud How to download from Soundcloud. Open a Soundcloud music track in your browser.
<?php |
$baseDir = 'mp3s'; |
$soundcloudURL = 'http://soundcloud.com/ninja-tune/sets/solid-steel-radio-shows/'; |
$urlBits = str_replace('http://', ', $soundcloudURL); |
$urlBits = preg_replace('@/$@', ', $urlBits); |
$urlBits = explode('/', $urlBits); |
/** |
* http://soundcloud.com/ninja-tune/sets/solid-steel-radio-shows/ |
* Array |
* ( |
* [0] => soundcloud.com |
* [1] => ninja-tune |
* [2] => sets |
* [3] => solid-steel-radio-shows |
* ) |
*/ |
array_shift($urlBits); |
$storage_dir = $baseDir . '/' . implode('/', $urlBits); |
if (!file_exists($storage_dir)) |
{ |
mkdir($storage_dir, 0755, true); |
} |
$playListFile = $storage_dir . '/' . $urlBits[count($urlBits) - 1] . '.m3u'; |
if (file_exists($playListFile)) |
{ |
unlink($playListFile); |
} |
$playList = array(); |
$file = getPage($soundcloudURL); |
if (!$file) die ('Can't get SoundCloud pagen'); |
$rows = explode('n', $file); |
$uris = array(); |
$pattern = '@'/.+download'@i'; |
$baseURL = 'http://soundcloud.com'; |
foreach ($rowsas$row) |
{ |
preg_match($pattern, $row, $matches); |
if (count($matches) > 0) |
{ |
$uris[] = str_replace('', ', $matches[0]); |
} |
} |
$i = 0; |
$uriCount = count($uris); |
foreach ($urisas$uri) |
{ |
$i++; |
echo'nFetching file ' . $i . ' of ' . $uriCount . 'n'; |
$uriHeaders = get_headers($baseURL . $uri); |
foreach ($uriHeadersas$header) |
{ |
preg_match('/^Content-Disposition: attachment;filename='(.*)'$/', $header, $matches); |
if (isset($matches[1])) |
{ |
$outputFilename = $matches[1]; |
break; |
} |
} |
$playList[] = $outputFilename; |
if (file_exists($storage_dir . '/' . $outputFilename)) |
{ |
echo'File exists, skipping.n'; |
continue; |
} |
$command = 'wget '$baseURL$uri' -O '$storage_dir/$outputFilename'; |
`$command`; |
} |
echo'nWriting play listn'; |
file_put_contents($playListFile, implode('n', array_reverse($playList)), FILE_APPEND); |
echo'nDonen'; |
functiongetPage($url, $referer = false, $timeout = 30, $header = false) |
{ |
$curl = curl_init(); |
if(strstr($referer,'://')){ |
curl_setopt ($curl, CURLOPT_REFERER, $referer); |
} |
curl_setopt ($curl, CURLOPT_URL, $url); |
curl_setopt ($curl, CURLOPT_TIMEOUT, $timeout); |
curl_setopt ($curl, CURLOPT_USERAGENT, sprintf('Mozilla/%d.0',rand(4,5))); |
curl_setopt ($curl, CURLOPT_HEADER, (int)$header); |
curl_setopt ($curl, CURLOPT_RETURNTRANSFER, 1); |
curl_setopt ($curl, CURLOPT_SSL_VERIFYPEER, 0); |
$html = curl_exec ($curl); |
curl_close ($curl); |
return$html; |
} |