View code | Get code

$user, //limit to a specific blip.tv user 'pagelen' => $limit, //limit number of entries, default is 10 'file_type' => $type, //limit by file type (separate multiples with comma) - options include: mp3,m4a,mov,mpg,mp4,m4v,etc. 'skin' => $format, //assign default output format - options include: rss, json, api //'page' => $page, //set starting page number for paginating results (works with video browsing api, need to verify if search api allows) //'topic_name' => $topic_name, //limit to a specific blip.tv tag or keyword - pass any string of comma separated tag names //'search' => terrapod, //pass any string - searches title, description and posting username ); //build request, encode entities (using http_build_query), for using blip.tv api (http://wiki.blip.tv/index.php/Query_Building_Parameters) $request = 'http://www.blip.tv/posts/?'.http_build_query($params); $data = simplexml_load_file($request); /* IF CURL IS NEEDED FOR YOUR WEB HOST, SUBSTITUTE CURL CODE BELOW BY REPLACING LINE 41 ABOVE... //send request using curl to blip.tv api $ch = curl_init(); $timeout = 5; //set to zero for no timeout curl_setopt ($ch, CURLOPT_URL,"$request"); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout); $response = curl_exec($ch); curl_close($ch); //load data from blip.tv api response $data = simplexml_load_string($response); */ ?>

Basic blip.tv API mashup

The example below retrieves data using the blip.tv API. Use the code view or zip files above to get started.
Actual blip.tv API Request:

channel->title; ?>

channel->item as $item) { $title = htmlentities($item->title); $link = $item->link; //get nodes in blip: namespace for media information $blip = $item->children('http://blip.tv/dtd/blip/1.0'); $embedURL = $blip->embedUrl; if ($blip->puredescription && $blip->puredescription != '') { $description = $blip->puredescription; } else { $description = 'No description available.'; } $user = $blip->user; $uploaded = $blip->datestamp; $duration = date("i:s",intval($blip->runtime)); $id = $blip->embedLookup; $show = $blip->show; $showPage = $blip->showpage; $rating = $blip->rating; ?>