<i id='s0efy'><tr id='s0efy'><dt id='s0efy'><q id='s0efy'><span id='s0efy'><b id='s0efy'><form id='s0efy'><ins id='s0efy'></ins><ul id='s0efy'></ul><sub id='s0efy'></sub></form><legend id='s0efy'></legend><bdo id='s0efy'><pre id='s0efy'><center id='s0efy'></center></pre></bdo></b><th id='s0efy'></th></span></q></dt></tr></i><div id='s0efy'><tfoot id='s0efy'></tfoot><dl id='s0efy'><fieldset id='s0efy'></fieldset></dl></div>

<small id='s0efy'></small><noframes id='s0efy'>

<legend id='s0efy'><style id='s0efy'><dir id='s0efy'><q id='s0efy'></q></dir></style></legend>

      1. <tfoot id='s0efy'></tfoot>
          <bdo id='s0efy'></bdo><ul id='s0efy'></ul>

        如何在 YouTube 频道中获取最新上传视频的 ID

        How to get the id of the latest uploaded video in a youtube channel(如何在 YouTube 频道中获取最新上传视频的 ID)

      2. <small id='AOwA4'></small><noframes id='AOwA4'>

              <tbody id='AOwA4'></tbody>

            <legend id='AOwA4'><style id='AOwA4'><dir id='AOwA4'><q id='AOwA4'></q></dir></style></legend>
            • <bdo id='AOwA4'></bdo><ul id='AOwA4'></ul>
              • <tfoot id='AOwA4'></tfoot>

                  <i id='AOwA4'><tr id='AOwA4'><dt id='AOwA4'><q id='AOwA4'><span id='AOwA4'><b id='AOwA4'><form id='AOwA4'><ins id='AOwA4'></ins><ul id='AOwA4'></ul><sub id='AOwA4'></sub></form><legend id='AOwA4'></legend><bdo id='AOwA4'><pre id='AOwA4'><center id='AOwA4'></center></pre></bdo></b><th id='AOwA4'></th></span></q></dt></tr></i><div id='AOwA4'><tfoot id='AOwA4'></tfoot><dl id='AOwA4'><fieldset id='AOwA4'></fieldset></dl></div>
                  本文介绍了如何在 YouTube 频道中获取最新上传视频的 ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  在优酷我如何获取我订阅的频道的最新上传视频的 ID(网址中的视频,如 v=....),用于嵌入
                  我在我的服务器端使用 php

                  In youtube How do i get the id of the latest uploaded video (the one that comes in the url like v=....) of a channel to which Im subscribed, for embeded
                  im using php in my server side

                  推荐答案

                  以下是使用 YouTube RSS 提要的示例,simplexml_load_file, parse_urlparse_str.

                  Here's a example using the YouTube RSS feeds, simplexml_load_file, parse_url, and parse_str.

                  <?php
                  
                  $id = NULL;
                  $username = 'YouTube';
                  
                  $xml = simplexml_load_file(sprintf('http://gdata.youtube.com/feeds/base/users/%s/uploads?alt=rss&v=2&orderby=published', $username));
                  
                  if ( ! empty($xml->channel->item[0]->link) )
                  {
                    parse_str(parse_url($xml->channel->item[0]->link, PHP_URL_QUERY), $url_query);
                  
                    if ( ! empty($url_query['v']) )
                      $id = $url_query['v'];
                  }
                  
                  echo $id; // Outputs the video ID.
                  

                  这篇关于如何在 YouTube 频道中获取最新上传视频的 ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Appending GET parameters to URL from lt;formgt; action(将 GET 参数附加到来自 lt;formgt; 的 URL行动)
                  Forcing quot;Save Asquot; dialog via jQuery GET(强制“另存为通过 jQuery GET 对话框)
                  PHP - get certain word from string(PHP - 从字符串中获取某个单词)
                  How to debug a get request in php using curl(如何使用 curl 在 php 中调试 get 请求)
                  get a # from a url in php(从 php 中的 url 获取 #)
                  PHP - include() file not working when variables are put in url?(PHP - 将变量放入 url 时,include() 文件不起作用?)

                      <tbody id='61kUX'></tbody>
                    • <bdo id='61kUX'></bdo><ul id='61kUX'></ul>
                      <i id='61kUX'><tr id='61kUX'><dt id='61kUX'><q id='61kUX'><span id='61kUX'><b id='61kUX'><form id='61kUX'><ins id='61kUX'></ins><ul id='61kUX'></ul><sub id='61kUX'></sub></form><legend id='61kUX'></legend><bdo id='61kUX'><pre id='61kUX'><center id='61kUX'></center></pre></bdo></b><th id='61kUX'></th></span></q></dt></tr></i><div id='61kUX'><tfoot id='61kUX'></tfoot><dl id='61kUX'><fieldset id='61kUX'></fieldset></dl></div>

                        <small id='61kUX'></small><noframes id='61kUX'>

                        • <legend id='61kUX'><style id='61kUX'><dir id='61kUX'><q id='61kUX'></q></dir></style></legend><tfoot id='61kUX'></tfoot>