Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Trying to add Custom Field data into a PHP function, but isn’t working. Re: Trying to add Custom Field data into a PHP function, but isn’t working.

#138516
Alen
Participant

You are already within php code block there is no need to nest `ID, ‘v_url’, true);
$JSON = file_get_contents(“https://gdata.youtube.com/feeds/api/videos/{$video_ID}?v=2&alt=json”);
$JSON_Data = json_decode($JSON);
$views = $JSON_Data->{‘entry’}->{‘yt$statistics’}->{‘viewCount’};
echo $views;

?>