I am trying to get the URL of a thumbnail from YouTube's History JSON feed. I have the key and can browse the JSON in my browser.
Feed: http://pastebin.com/mePrYhxK
I can't seem to be able to get anything.
$json = file_get_contents('YouTubeJSONURLincludingkey');
$data = json_decode($json,true);
$url = $data->{'items'}[0]->{'snippet'}->{'thumbnails'}->{'medium'}->{'url'};
echo $url;
Right now, getting nothing.
json_decodetrueas a second param, so things are arrays,not objects.var_dumpon$data, and each child of it? When you say you're not getting anything, what do you mean?