Automatically Post Your YouTube Videos to Your Website

Recently, one of our clients, the Oration Group, asked that we find a way to post their YouTube videos to their website automatically. There’s lots of ways to do this including using several widgets YouTube supplies or by rolling your own feed parser.

Integrating the video listings with the visual styling of this site was essential, which ruled out the branded YouTube widgets. There was also a very small budget, which eliminated custom coding a feed parser to display the information exactly as we wanted.

Our middle of the road solution delivers a lot of functionality, with a minimal investment. You’ll have an automatically updating feed of video on your site in no time. Here’s how:

  1. Download the files (Courtesy of Feed for All)
  2. Edit the following code to use your website urls

    <?php
    $XMLFILE = "http://gdata.youtube.com/feeds/base/users/youryoutubeusernamehere/uploads?alt=rss&v=2&client=ytapi-youtube-profile";
    $TEMPLATE = "http://www.yourwebsitehere.com/sample-template.html";
    $MAXITEMS = "50";
    include("/rss2html.php");
    ?>

  3. Paste the script above anywhere on your php enabled website
  4. Upload the files to the base (root) folder of your website.

If you’d like to learn more about what this script can do, including many customization options, check out the full documentation.