<?phprequire 'vendor/autoload.php';$api_key = 'AIzaSyDOZpm1B6jnFK1plvgCZBD_hF7nUmJ77eA';$playlist_id = 'PLDoPjvoNmBAzH72MTPuAAaYfReraNlQgM'; $api_url = 'https://www.googleapis.com/youtube/v3/playlistItems?part=snippet,id&order=date&maxResults=150&playlistId='. $playlist_id . '&key=' . $api_key;$playlist = json_decode(file_get_contents($api_url));print count($playlist->items);?>
How can I collect all the video links of a particular youtube playlist in php ?