Ik heb net deze script af met behulp van een tutorial en hij doet, maar ik weet niet hoe ik de thumbnail kan laten verschijnen, het enige wat de script nu laat zien is de titel van de video en de beschrijving.

Hoe doe ik dat 'ie ook het plaatje van de video laat zien?

Hier is de script in actie te zien:

http://watdoetnederland.nl/videos.php

En hier is de code:


<?php

$xml = simplexml_load_file('https://gdata.youtube.com/feeds/api/users/pyrobooby/uploads');
$video_limit = 5;
$count = 0;

foreach ($xml->entry as $video)
{
if ($count < $video_limit)
{
$id = $video->id;
$url = 'http://gdata.youtube.com/feeds/api/videos/';
$video_id = substr($id, strlen($url));

?>


<div class="video">

<div class="thumbnail_container">
<div class="thumbnail" videoid="<? echo $video_id; ?>"></div>
</div>

<div class="video_details">
<div class="video_title"><? echo $video->title; ?></div>
<div class="video_description"><? echo $video->content; ?></div>
</div>

</div>

<div class="clear"> </div>


<?php
}
$count++;
}
?>


<?php

$xml = simplexml_load_file('https://gdata.youtube.com/feeds/api/users/pyrobooby/uploads');
$video_limit = 5;
$count = 0;

foreach ($xml->entry as $video)
{
if ($count < $video_limit)
{
$id = $video->id;
$url = 'http://gdata.youtube.com/feeds/api/videos/';
$video_id = substr($id, strlen($url));

?>


<div class="video">

<div class="thumbnail_container">
<div class="thumbnail" videoid="<? echo $video_id; ?>"></div>
</div>

<div class="video_details">
<div class="video_title"><? echo $video->title; ?></div>
<div class="video_description"><? echo $video->content; ?></div>
</div>

</div>

<div class="clear"> </div>


<?php
}
$count++;
}
?>
Hier heb je toch al een topic over openstaan?
excues, d8 dat 'ie al weg was

Reageren