SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Hybrid View

  1. #1
    SitePoint Zealot pavanpuligandla's Avatar
    Join Date
    Sep 2008
    Location
    hyderabad
    Posts
    179
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    youtube video plugin with search for PHP websites

    Hi,
    i would like to embed all the videos from youtube with search option.
    when user searches for say "wild wild west" it should grab all the videos from YOUTUBE
    and show it in our WEBPAGE Template.
    is there any option to do this in php? is it free or we need to be a youtube affiliate?
    example site which i;ve seen is : http://www.muzikspace.com/videos.aspx

    can anyone please help me out, as i;m confused alot how can we grab all the videos from youtube for free?
    Many Thanks,
    PHP Professional turned ASP.NET Professional

  2. #2
    Twitter: @AnthonySterling silver trophy AnthonySterling's Avatar
    Join Date
    Apr 2008
    Location
    North-East, UK.
    Posts
    6,111
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    You can use YouTube's API for this, see http://code.google.com/apis/youtube/...deo_feeds.html .



    It's fairly simple to integrate.
    @AnthonySterling: I'm a PHP developer, a consultant for oopnorth.com and the organiser of @phpne, a PHP User Group covering the North-East of England.

  3. #3
    SitePoint Zealot pavanpuligandla's Avatar
    Join Date
    Sep 2008
    Location
    hyderabad
    Posts
    179
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks for the reply,
    but i dont want to see you tube logos and second one is,
    i want almost all the videos from youtube to be displayed on my site, is it possible?
    i'll check the link you provided,
    many thanks sir.
    PHP Professional turned ASP.NET Professional

  4. #4
    SitePoint Zealot pavanpuligandla's Avatar
    Join Date
    Sep 2008
    Location
    hyderabad
    Posts
    179
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i want a keyword search when input a keyword, it should return
    the videos from youtube. is there any php code for this?
    if yes, can anyone pls post it here.
    thanks.
    PHP Professional turned ASP.NET Professional

  5. #5
    Twitter: @AnthonySterling silver trophy AnthonySterling's Avatar
    Join Date
    Apr 2008
    Location
    North-East, UK.
    Posts
    6,111
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    This snippet will return a SimpleXML object containing 20 matching, embeddable, YouTube videos which you can use for your site.
    PHP Code:
    <?php
    $sKeywords 
    'PHP Tutorials';
    $oXML simplexml_load_file(
        
    sprintf(
            
    'http://gdata.youtube.com/feeds/api/videos?q=%s&start-index=1&max-results=20&format=5&orderby=relevance',
            
    urlencode($sKeywords)
        )
    );
    ?>
    Read the API docs, they're quite well structured compared to some! Good luck!

    @AnthonySterling: I'm a PHP developer, a consultant for oopnorth.com and the organiser of @phpne, a PHP User Group covering the North-East of England.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •