- file_get_contents: documentation ( source)
- array_push: documentation ( source)
- json_decode: documentation ( source)
<?php
$cont = json_decode(file_get_contents('http://gdata.youtube.com/feeds/api/playlists/PLMiRl9MF7bqhLJv1PKCuxpAFCUG5AJCeT/?v=2&alt=json&feature=plcp'));
$feed = $cont->feed->entry;
$videoID_array = array();
if(count($feed))
{
foreach($feed as $item)
array_push($videoID_array, $item->{'media$group'}->{'yt$videoid'}->{'$t'});
}
foreach ($videoID_array as $arrayItem) {
echo "livestreamer.exe -p C:\Users\Gabriele.coen\Downloads\\vlc\\vlc.exe youtube.com/watch?v=" . $arrayItem . " 360p<br/>";
}
?>