SEARCH YOUTUBE
Keywords:
Order by:
User views
User rating
Publication time
children('http://a9.com/-/spec/opensearchrss/1.0/'); $total = $counts->totalResults; $startOffset = $counts->startIndex; $endOffset = ($startOffset-1) + $counts->itemsPerPage; // include Pager class require_once 'Pager/Pager.php'; $params = array( 'mode' => 'Jumping', 'perPage' => $i, 'delta' => 5, 'totalItems' => $total, ); $pager = & Pager::factory($params); $links = $pager->getLinks(); ?>
Search Results
Showing - Of
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 3GP STREAM URL 2 $attrs = $media->group->content[0]->attributes(); $mobilestream = $attrs['url']; // get video thumbnail $attrs = $media->group->thumbnail[0]->attributes(); $thumbnail = $attrs['url']; // get
node for video length $yt = $media->children('http://gdata.youtube.com/schemas/2007'); $attrs = $yt->duration->attributes(); $length = $attrs['seconds']; ////////// get
node for viewer statistics ///$yt = $entry->children('http://gdata.youtube.com/schemas/2007'); ///if ($yt->statistics) { ///$attrs = $yt->statistics->attributes(); ///$viewCount = $attrs['viewCount']; ///} else { /// $viewCount = 0; ///} // get
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; } // get video ID $arr = explode('/',$entry->id); $id = $arr[count($arr)-1]; // print record ?>
"; echo "
"; echo "\n"; ?>
{$media->group->title}\n"; ?>
0.0) && ($rating<0.5))) { $rating = "
"; }else if (($rating=="0.5") || (($rating>0.5) && ($rating<1.0))) { $rating = "
"; }else if (($rating=="1.0") || (($rating>1.0) && ($rating<1.5))) { $rating = "
"; }else if (($rating=="1.5") || (($rating>1.5) && ($rating<2.0))) { $rating = "
"; }else if (($rating=="2.0") || (($rating>2.0) && ($rating<2.5))) { $rating = "
"; }else if (($rating=="2.5") || (($rating>2.5) && ($rating<3.0))) { $rating = "
"; }else if (($rating=="3.0") || (($rating>3.0) && ($rating<3.5))) { $rating = "
"; }else if (($rating=="3.5") || (($rating>3.5) && ($rating<4.0))) { $rating = "
"; }else if (($rating=="4.0") || (($rating>4.0) && ($rating<4.5))) { $rating = "
"; }else if (($rating=="4.5") || (($rating>4.5) && ($rating<5.0))) { $rating = "
"; }else if (($rating=="5.0") || ($rating>5.0)) { $rating = "
"; } echo sprintf("%0.2f", $length/60) . " {$rating}
"; echo "
"; } } include("footer.php");
Log in