//Must enable google API + Youtube v3 API
// https://developers.google.com/youtube/v3/docs/search/list
Using this "q" for searching video account channelID.
After that put channelID into channelID field. then get all video from the specifies youtube account.
<?php
$API_Key = 'KEY';
$Channel_ID = "Channel_ID";
$Max_Results = 10;
$apiData = @file_get_contents('https://www.googleapis.com/youtube/v3/search?order=date&part=snippet&channelId='.$Channel_ID.'&maxResults='.$Max_Results.'&key='.$API_Key.'');
if($apiData){
$videoList = json_decode($apiData);
}else{
echo 'Invalid API key or channel ID.';
}
if(!empty($videoList->items)){
foreach($videoList->items as $item){
// Embed video
if(isset($item->id->videoId)){
echo '
<div class="yvideo-box">
<iframe width="280" height="150" src="https://www.youtube.com/embed/'.$item->id->videoId.'" frameborder="0" allowfullscreen></iframe>
<h4>'. $item->snippet->title .'</h4>
<h5>'. $item->id->videoId .'</h5>
</div>';
}
}
}else{
echo '<p class="error">'.$apiError.'</p>';
}
Done