Skip to content

Instantly share code, notes, and snippets.

@duan-li
Created November 5, 2013 05:14
Show Gist options
  • Save duan-li/7314230 to your computer and use it in GitHub Desktop.
Save duan-li/7314230 to your computer and use it in GitHub Desktop.
for ($i=1; $i<=128; $i+=25)
{
$url = "https://gdata.youtube.com/feeds/api/playlists/_PLAYLIST_ID_?start-index=$i&amp;max-results=150&amp;v=2";
$file = file_get_contents ($url);
$arr = xml2array($file);
foreach($arr['feed']['entry'] as $e)
{
$url = $e['media:group']['media:player_attr']['url'];
$url = str_replace('&feature=youtube_gdata_player', '', $url);
echo $url."<br />";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment