2011-03-14, 02:35 AM
Hello,
What I want to do is take the following code
and make it become {$youtuberss}
so that I can enter it in a specific location in my theme.
Thank you for help.
Derrick
What I want to do is take the following code
$id= $_GET['youtube_vid'];
// get the feed using magpieRSS
include('rss_fetch.inc');
$feed = fetch_rss("http://gdata.youtube.com/feeds/api/users/arawlifestlye/uploads?alt=rss");
$found = false;
foreach ($feed->items as $item){
if(strstr($item['guid'], $id)){
$found = true;
break;
}
}
if($found){
$video = $item;
?>
<div class="video">
<h3><?= ucfirst($video["title"]) ?></h3>
<p><strong>Date :</strong> <?= date("d-m-Y", strtotime($video['pubdate']) ) ?></p>
<p>
<a href="http://www.youtube.com?v=<?= $id ?>">View it on YouTube</a><br />
</p>
<p><?= $video["description"] ?></p>
<div class="object">
<object width="425" height="350">
<param name="movie" value="http://www.youtube.com/v/<?= $id ?>">
</param>
<embed src="http://www.youtube.com/v/<?= $id ?>" type="application/x-shockwave-flash" width="425" height="350"></embed>
</object>
</div>
</div>
<?php
}else{
echo "<h3>No Videos Found</h3>";
}
and make it become {$youtuberss}
so that I can enter it in a specific location in my theme.
Thank you for help.
Derrick