Thumbnail

Social

Popular Music Video

Recommend Video'; echo '
    '; $word = str_replace(array(" ", " "), "%20", $tags[0]); $data = 'https://www.googleapis.com/youtube/v3/search?part=snippet&type=video&order=relevance&maxResults=50&q='.$word.'&key=AIzaSyAhUpdYC6nAIU3fYI1cvWotVP5_WmRD_v0'; $json = @file_get_contents($data); if($json){ $obj = json_decode($json,true); for($num = 0 ; $num < count($obj['items']) && $num <= 50 ; $num++){ $imgList = $obj['items'][$num]['snippet']['thumbnails']['high']['url']; $titleList = $obj['items'][$num]['snippet']['title']; $videoIdList = $obj['items'][$num]['id']['videoId']; echo "
  • \"{$titleList}\"{$titleList}
  • "; } } echo '
'; } */?>