Answer the question
In order to leave comments, you need to log in
How to get Youtube playlist view counter value?
Taking the value of the video counter is simple:
<?php
$youtube_view_count = json_decode(file_get_contents('http://gdata.youtube.com/feeds/api/videos/snHJl1kSz6A?v=2&alt=json'))->entry->{'yt$statistics'}->viewCount;
echo $youtube_view_count;
?>
Answer the question
In order to leave comments, you need to log in
Take all the info on the playlist ( https://gdata.youtube.com/feeds/api/playlists/8BCD... ), and sum up the viewCount. XML, I think, is better to parse with some SimpleXML , and loop over the resulting object. Well, either pull out everything with regexps, but make sure that something from the descriptions / names does not get into the selection then.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question