How to Fetch all Channel Youtube Videos with PHP

How to retrieve all youtube videos from a youtube channel. Get the latest and all videos from a youtube channel via php youtube api.

This is a short tutorial snippet on how to fetch via YouTube API's a channels videos. You first have to create an API Key in order to be granted into YouTube API Data. 

Getting Started on YouTube API:  

//Get videos from channel by YouTube Data API
$API_key    = 'API_KEY';
$channelID  = 'CHANNEL_ID';
$maxResults = 50;

$videoList = json_decode(file_get_contents(''.$channelID.'&maxResults='.$maxResults.'&key='.$API_key.''), true);

echo "<pre>";
echo "</pre>";