View file related.php

File size: 1.39Kb
<?php

echo '<div class="logo" align="center"> Related videos</div>';
$grab=ngegrab('https://gdata.youtube.com/feeds/api/videos/'.$_GET['id'].'/related?v=2&max-results=10&alt=jsonc');
$json = json_decode($grab);
$responada = $json->data->items;
$respon = $json->data->items->totalItems;
if (!empty($responada)) {$jumlah = $json->data->totalItems;
$jumlah=str_replace(',','',$jumlah);
foreach($json->data->items as $hasil) {$name = $hasil->title;
$ln=preg_replace("/[^A-Za-z0-9[:space:]]/","$1",$name);
$ln=str_replace(' ','-',$ln);
$link = $hasil->id;
$duration = $hasil->duration;
$tgl = $hasil->uploaded;
$date = dateyt($tgl);
$rating = $hasil->duration;
$view= $hasil->viewCount;
$likebar1=''.substr($view,0,2).'';
$likebar2=''.substr($view,2,2).'';
$likebar3=''.substr($view,4,2).'';
$rate=substr($rating,0,1);
$durasi=format_time($duration);
echo '<table width="100%" class="list" ><tr><td width="10" valign="middle"><img class="list" src="http://img.youtube.com/vi/'.$link.'/default.jpg" alt=" '.$name.'" width="110px" height="90px" /><td valign="middle">
<a href="/download/'.$link.'/'.$ln.'.html"><b>'.$name.'</b></a><br/>
Time: '.$durasi.'<br/>
<img src="/style/'.$rate.'.0.gif" alt=""/><br/>
Category: '.$hasil->category.'<br/> 
Upload Date: '.$date.'
</td></td></td></tr></table><a href="http://click.buzzcity.net/click.php?partnerid=111930">Click Here For Download</a></div>';}}?>