Skip to content

Instantly share code, notes, and snippets.

@gnuget
Created February 3, 2009 16:32
Show Gist options
  • Save gnuget/57604 to your computer and use it in GitHub Desktop.
Save gnuget/57604 to your computer and use it in GitHub Desktop.
/**
* Search Videos
* @param array $params
*
*/
function search($params){
$params = $this->__paramsToUrl($params);
$this->socket = new HttpSocket();
$uri = "http://gdata.youtube.com/feeds/api/videos".$params;
$request = array(
'method' => 'GET',
'header' => array( 'Content-length' => 0,
'Content-Type' => 'application/atom+xml charset=UTF-8'
),
'uri' => $uri
);
$output = $this->socket->request($request);
$output = new Xml($output);
$output = Set::reverse($output);
return $output;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment