i am getting youtube video description with
apikey = 'KEY'; $googleApiUrl = 'https://www.googleapis.com/youtube/v3/videos?id=' . $videoId . '&key=' . $apikey . '&part=snippet'; $ch = curl_init(); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_URL, $googleApiUrl); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_VERBOSE, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); $response = curl_exec($ch); curl_close($ch); $data = json_decode($response); $value = json_decode(json_encode($data), true); $title = $value['items'][0]['snippet']['title']; $description = $value['items'][0]['snippet']['description'];
is there any way to get just the "starting words" without that useless part as social links & donate etc? thanks guys