Przejzalem manuala, ale nie moge sobie z tym poradzic;/
z gory dzieki za pomoc;)
// set feed URL $feedURL = 'http://gdata.youtube.com/feeds/api/users/ladygagaofficial'; // read feed into SimpleXML object $sxml = simplexml_load_file($feedURL); // iterate over entries in feed foreach ($sxml->entry as $entry) { // get nodes in media: namespace for media information $media = $entry->children('http://search.yahoo.com/mrss/'); // get video player URL $attrs = $media->group->player->attributes(); $watch = $attrs['url']; // get video thumbnail $attrs = $media->group->thumbnail[0]->attributes(); $thumbnail = $attrs['url']; // get <yt:duration> node for video length $yt = $media->children('http://gdata.youtube.com/schemas/2007'); $attrs = $yt->duration->attributes(); $length = $attrs['seconds']; // get <yt:stats> node for viewer statistics $yt = $entry->children('http://gdata.youtube.com/schemas/2007'); $attrs = $yt->statistics->attributes(); $viewCount = $attrs['viewCount']; // get <gd:rating> node for video ratings $gd = $entry->children('http://schemas.google.com/g/2005'); if ($gd->rating) { $attrs = $gd->rating->attributes(); $rating = $attrs['average']; } else { $rating = 0; }