Load playlist from external file / hide original media files

Showing 1-2 of 2 messages
Load playlist from external file / hide original media files tobivice 4/29/12 10:42 AM
Is there any way of not putting the links to the original media files in the source code but store the actual array of items to be played in seperate (JS-) file? I have done some research in the docs but I can't see any option that supports loading the playlist from a external file.
Re: Load playlist from external file / hide original media files Crazy Zurfer 5/7/12 9:42 PM
You may do that with php... you could open the files with php (curl), then show the file by using the function: header('Location: ' .$mp3);
like this:

<?php
function get_url_contents($url){
$crl = curl_init();
$timeout = 25;
curl_setopt ($crl, CURLOPT_URL,$url);
curl_setopt ($crl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($crl, CURLOPT_CONNECTTIMEOUT, $timeout);
$ret = curl_exec($crl);
curl_close($crl);
return $ret;
}

$file = get_url_contents('http://www.website.com/music.mp3");

header('Location: ' .$file);
exit();
?>


El domingo, 29 de abril de 2012 13:42:24 UTC-4, tobivice escribió:
Is there any way of not putting the links to the original media files in the source code but store the actual array of items to be played in seperate (JS-) file? I have done some research in the docs but I can't see any option that supports loading the playlist from a external file.