I am trying to get some information about YouTube channel's from the YouTube API.
This is an example the output (using Google's channel), http://gdata.youtube.com/feeds/api/users/Google?alt=json
I am getting the JSON using this:
$json = file_get_contents("http://gdata.youtube.com/feeds/api/users/Google?alt=json");
$data = json_decode($json, true);
I uploaded the output of var_dump($data); to pastebin: http://pastebin.com/CWA7YYGi
What I want to get is totalUploadViews from yt$statistics.
What I have tried so far is:
echo $data['yt$statistics']['totalUploadViews'];
But this gives me an error: Notice: Undefined index: yt$statistics
Not sure what I am doing wrong, would appreciate the help.