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

        <bdo id='6Cu8O'></bdo><ul id='6Cu8O'></ul>
      1. <legend id='6Cu8O'><style id='6Cu8O'><dir id='6Cu8O'><q id='6Cu8O'></q></dir></style></legend>

      2. <small id='6Cu8O'></small><noframes id='6Cu8O'>

        <tfoot id='6Cu8O'></tfoot>

        如何使用 PHP 检查 YouTube 上是否存在视频?

        How do I check if a video exists on YouTube, using PHP?(如何使用 PHP 检查 YouTube 上是否存在视频?)

          • <legend id='dosA1'><style id='dosA1'><dir id='dosA1'><q id='dosA1'></q></dir></style></legend>

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

              <tfoot id='dosA1'></tfoot>

                • <bdo id='dosA1'></bdo><ul id='dosA1'></ul>
                  <i id='dosA1'><tr id='dosA1'><dt id='dosA1'><q id='dosA1'><span id='dosA1'><b id='dosA1'><form id='dosA1'><ins id='dosA1'></ins><ul id='dosA1'></ul><sub id='dosA1'></sub></form><legend id='dosA1'></legend><bdo id='dosA1'><pre id='dosA1'><center id='dosA1'></center></pre></bdo></b><th id='dosA1'></th></span></q></dt></tr></i><div id='dosA1'><tfoot id='dosA1'></tfoot><dl id='dosA1'><fieldset id='dosA1'></fieldset></dl></div>
                    <tbody id='dosA1'></tbody>
                  本文介绍了如何使用 PHP 检查 YouTube 上是否存在视频?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  如何使用 PHP 检查 YouTube 上是否存在视频?

                  How do I check if a video exists on YouTube, using PHP?

                  推荐答案

                  使用 Youtube 的 API 怎么样?
                  毕竟,这意味着使用一些官方文件,与解析一些 HTML 页面相比,更改的可能性较小.

                  What about using Youtube's API?
                  After all, that would mean using some official, which is less likely to change than going with parsing some HTML page.

                  有关详细信息:YouTube API 和工具 - 开发人员指南:PHP

                  For more information: YouTube APIs and Tools - Developer's Guide: PHP

                  检索特定视频条目似乎很有趣:如果您向这样的 URL 发送请求:

                  The Retrieving a specific video entry seems quite interesting: if you send a request to an URL like this one:

                  http://gdata.youtube.com/feeds/api/videos/videoID
                  

                  (用视频的 ID 替换videoID",当然,在你的例子中是GeppLPQtihA"),如果视频有效,你会得到一些 ATOM 提要;如果不是,则为无效 ID"

                  (replacing "videoID" by the ID of the video, of course – "GeppLPQtihA" in your example), you'll get some ATOM feed if the video is valid; and "Invalid id" if it's not


                  而且,我坚持:这样,您依赖于文档化的 API,而不是依赖于今天存在但不能保证的某种行为.


                  And, I insist: this way, you rely on a documented API, and not on some kind of behavior that exists today, but is not guaranteed.

                  这篇关于如何使用 PHP 检查 YouTube 上是否存在视频?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  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() 文件不起作用?)

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

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

                        • <tfoot id='jNRRN'></tfoot>
                            <tbody id='jNRRN'></tbody>