<?php // simple script to download mp3's from a password protected site using a playlist file //remote username $username = 'username'; // remote password $password = 'password'; // m3u file $get = file("file.m3u"); // m3u (playlist) file contains paths to remote files foreach($get as $url){ $trim_url = rtrim($url); // trim newline $explode_url = explode("//", $trim_url); //explode url so you can insert username:password for wget $fixed_url = 'http://' . $username . ':' . $password . '@' . $explode_url[1]; exec("wget $fixed_url"); // downloads to current directory } ?>
You need to create an account or log in to post comments to this site.