title: Create an video gallery with UStream API
body: <p>I'm trying to create a simple video gallery that pulls the videos from the recorded shows of a specific Ustream user.  I've been doing some research and looking at the <a href="http://developer.ustream.tv/data_api/docs" rel="nofollow">API Documentation</a> but can't seem to figure it out.</p>
  
  <p>This is what I have so far.</p>
  
  <pre><code>$request =  'http://api.ustream.tv';
  $format = 'php';   // this can be xml, json, html, or php
  $args .= 'subject=[channel]';
  $args .= '&amp;uid= [the-crossfader-show]';
  $args .= '&amp;command=[getCusomEmbedTag]';
  $args .= '&amp;params=[autoplay:false; mute:false; height:100; width:100;]';
  $args .= '&amp;page=[1]';
  $args .= '&amp;limit=[20]';
  $args .= '&amp;key=[4872929558631FEB4E9AEE8DDF080F28]';
  
  // Get and config the curl session object
  $session = curl_init($request.'/'.$format.'?'.$args);
  curl_setopt($session, CURLOPT_HEADER, false);
  curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
  
  //execute the request and close
  $response = curl_exec($session);
  curl_close($session);
  
  // this line works because we requested $format='php' and not some other output format
  $resultsArray = unserialize($response);
  
  // this is your data returned; you could do something more useful here than just echo it
  print_r $resultsArray['result'];
  </code></pre>
  
  <p>I'm not really sure what to do after this to turn it into a simple gallery.  Anyone have any experience with the UStream API or have suggestions on what to do next?</p>