Created
February 3, 2009 16:32
-
-
Save gnuget/57604 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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