1. <tfoot id='80tGd'></tfoot>

    2. <legend id='80tGd'><style id='80tGd'><dir id='80tGd'><q id='80tGd'></q></dir></style></legend>

        <bdo id='80tGd'></bdo><ul id='80tGd'></ul>

    3. <small id='80tGd'></small><noframes id='80tGd'>

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

        Youtube 频道订阅人数

        时间:2023-10-10
          1. <small id='4IAzJ'></small><noframes id='4IAzJ'>

              <tbody id='4IAzJ'></tbody>
          2. <legend id='4IAzJ'><style id='4IAzJ'><dir id='4IAzJ'><q id='4IAzJ'></q></dir></style></legend>
            <i id='4IAzJ'><tr id='4IAzJ'><dt id='4IAzJ'><q id='4IAzJ'><span id='4IAzJ'><b id='4IAzJ'><form id='4IAzJ'><ins id='4IAzJ'></ins><ul id='4IAzJ'></ul><sub id='4IAzJ'></sub></form><legend id='4IAzJ'></legend><bdo id='4IAzJ'><pre id='4IAzJ'><center id='4IAzJ'></center></pre></bdo></b><th id='4IAzJ'></th></span></q></dt></tr></i><div id='4IAzJ'><tfoot id='4IAzJ'></tfoot><dl id='4IAzJ'><fieldset id='4IAzJ'></fieldset></dl></div>

              <tfoot id='4IAzJ'></tfoot>

                <bdo id='4IAzJ'></bdo><ul id='4IAzJ'></ul>

                  本文介绍了Youtube 频道订阅人数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在尝试获取特定 YouTube 频道的订阅者数量.我参考了 Stackoverflow 和外部网站上的一些链接,遇到了类似 this.几乎所有链接都建议我使用 youtube gdata api 并从subscriberCount 中提取计数,但以下代码

                  I'm trying to pull the count of subscribers for a particular youtube channel. I referred some links on Stackoverflow as well as external sites, came across links like this. Almost all the links suggested me to use youtube gdata api and pull the count from subscriberCount but the following code

                  $data   = file_get_contents("http://gdata.youtube.com/feeds/api/users/Tollywood/playlists");
                  $xml    = simplexml_load_string($data);
                  

                  print_r($xml);

                  print_r($xml);

                  不返回这样的subscriberCount.有没有其他方法可以让订阅者计数,或者我做错了什么?

                  returns no such subscriberCount. Is there any other way of getting subscribers count or am I doing something wrong?

                  推荐答案

                  试试这个 ;)

                  <?php 
                  $data = file_get_contents('http://gdata.youtube.com/feeds/api/users/Tollywood');
                  
                  $xml = new SimpleXMLElement($data);
                  $stats_data = (array)$xml->children('yt', true)->statistics->attributes();
                  $stats_data = $stats_data['@attributes'];
                  
                  /********* OR **********/
                  
                  $data = file_get_contents('http://gdata.youtube.com/feeds/api/users/Tollywood?alt=json');
                  $data = json_decode($data, true);
                  $stats_data = $data['entry']['yt$statistics'];
                  
                  /**********************************************************/
                  
                  echo 'lastWebAccess = '.$stats_data['lastWebAccess'].'<br />';
                  echo 'subscriberCount = '.$stats_data['subscriberCount'].'<br />';
                  echo 'videoWatchCount = '.$stats_data['videoWatchCount'].'<br />';
                  echo 'viewCount = '.$stats_data['viewCount'].'<br />';
                  echo 'totalUploadViews = '.$stats_data['totalUploadViews'].'<br />';
                  ?>
                  

                  这篇关于Youtube 频道订阅人数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:如何使用 youtube api 从播放列表中获取所有视频? 下一篇:如何在 YouTube 频道中获取最新上传视频的 ID

                  相关文章

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