Created
November 5, 2013 05:14
-
-
Save duan-li/7314230 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for ($i=1; $i<=128; $i+=25) | |
{ | |
$url = "https://gdata.youtube.com/feeds/api/playlists/_PLAYLIST_ID_?start-index=$i&max-results=150&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