/ Published in: PHP
Uses the Magpie RSS library (http://magpierss.sourceforge.net/). I suppose I should be using the GData API, but this was a quicker solution for me.
Expand |
Embed | Plain Text
require_once('magpierss/rss_fetch.inc'); $rss = fetch_rss("http://www.youtube.com/rss/user/$username/videos.rss"); foreach ($rss->items as $item) { preg_match('/http:\/\/(.*)default.jpg/',$item['description'],$matches); $thumb = $matches[0]; $title = $item['title']; $link = $item['link']; $date = date("n/d/Y",strtotime($item['pubdate'])); ?> <div class="video"> </div> <?php } ?>
You need to login to post a comment.
