<?php
//get or create youtube username
if( isset($_GET['user']) ){$youtube_user = $_GET['user'];}
else {$youtube_user = 'rickrolled';}
//create php5tube object and get videos
include_once("Php5tube.php");
$php5tube = new Php5tube('Video','User','Comment');
$videos = $php5tube->getUserVideos($youtube_user);
//dump array of views
//var_dump($videos);
?>
<html>
<head><title></title></head>
<body>
<table cellpadding="0" cellspacing="0">
<?php foreach($videos as $video) { ?>
<tr><td>
<div style="padding:2px;"><img src="<?php echo $video['Video']['thumbnail_url1']; ?>"></div>
<div style="padding:2px;"><img src="<?php echo $video['Video']['thumbnail_url2']; ?>"></div>
<div style="padding:2px;"><img src="<?php echo $video['Video']['thumbnail_url3']; ?>"></div>
</td><td>
<div style="padding:10px;">
<a href="http://www.youtube.com/v/<?php echo $video['Video']['youtube_id']; ?>">
<img src="<?php echo $video['Video']['thumbnail_url4']; ?>">
</a>
</div>
</td>
<td>
<div style="font-size:16pt;"><?php echo $video['Video']['title']; ?></div>
<div><b>Category</b> = <?php echo $video['Video']['category']; ?> times</div>
<div><b>Tags</b> = <?php echo $video['Video']['keywords']; ?> times</div>
<div><b>Description</b> = <?php echo $video['Video']['description']; ?></div>
<div><b>Views</b> = <?php echo $video['Video']['view_count']; ?> times</div>
<div><b>Marked as favorite</b> = <?php echo $video['Video']['favorite_count']; ?> times</div>
</td></tr>
<?php } ?>
</table>
</body>
</html>
|