PHP Classes

search and play

Recommend this page to a friend!

      YouTube API  >  All threads  >  search and play  >  (Un) Subscribe thread alerts  
Subject:search and play
Summary:search and play
Messages:2
Author:Collin de henkjanbruin
Date:2008-10-31 07:59:56
Update:2008-10-31 09:58:20
 

  1. search and play   Reply   Report abuse  
Picture of Collin de henkjanbruin Collin de henkjanbruin - 2008-10-31 07:59:56
Hi,

I just came across this api and i am curious about if it can do what i want.

I want to do this: something.php?s=james bond trailer
And then it has to search and play the first result.

Can it do something like that? Or can i make it do that?

Thanks in advance!

Bye,

Collin

  2. Re: search and play   Reply   Report abuse  
Picture of Er. Rochak Chauhan Er. Rochak Chauhan - 2008-10-31 09:58:20 - In reply to message 1 from Collin de henkjanbruin
sure... its not biggie..
what ever you search, the first record's information can be extracted like:

require_once("YouTubeAPI.inc.php");
$api=new YouTubeAPI($keyword,$maxrecords,1);
$result=$api->getStreamingLinks();

$firstRecord=$result[0];


now you can stream the video to mobie or PC (browser) using the links.

In case of any other issue feel free to contact me on IM at (www.rochakchauhan.com/blog)