php - Retrive recent videos of multiple YouTube users and order by most recent -


so title suggests looking use php retrive recent videos , json data multiple youtube channels. have looked around stackoverflow , cannot find reply user looking (even tweaking.)

i able use code grab uploaded youtube videos single user.

<?php  $xml = simplexml_load_file("https://gdata.youtube.com/feeds/api/users/1jboa_hgxttggs8oirfykg/upload     s"); $json = json_encode($xml); $videos = json_decode($json, true);  var_dump($videos); 

note: code have shown work looking code display videos multiple users in order.

thanks in advance :)

if know name of users, guesing do, put them in array , iterate on array using code have working above inside each iteration.

// array of users (dummy values....) $users = array("1jboa_hgxttggs8oirfykg", "4dfg_hgxttggs8oirfykg", "6dzgdf_hgxttggs8oirfykg");  $allvideolists = array();  // iterate on each user in 'users' array 1 one foreach ($users $thisuser) {          //get video list user , create object json          $xml=simplexml_load_file("https://gdata.youtube.com/feeds/api/users/" + $thisuser + "/uploads");          $json = json_encode($xml);          $videos = json_decode($json, true);          //add users video list array of user's video lists          $allvideolists[] = $videos } 

Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -